|
|
|
|
|
|
| <!Doctype html>
|
| <html>
|
| <head>
|
| <meta charset="utf-8">
|
| <title>Investor-State LawGuide | ISLG</title>
|
| <meta http-equiv="X-UA-Compatible" content="IE=edge">
|
| <meta name="description" content="Industrial project boilerplate">
|
| <meta name="viewport" content="width=device-width, initial-scale=1">
|
| <link rel="shortcut icon" href="/assets/icons/favicon.ico">
|
|
|
|
|
|
|
|
|
| <link rel="apple-touch-icon" sizes="57x57" href="/assets/icons/apple-icon-57x57.png">
|
| <link rel="apple-touch-icon" sizes="60x60" href="/assets/icons/apple-icon-60x60.png">
|
| <link rel="apple-touch-icon" sizes="72x72" href="/assets/icons/apple-icon-72x72.png">
|
| <link rel="apple-touch-icon" sizes="76x76" href="/assets/icons/apple-icon-76x76.png">
|
| <link rel="apple-touch-icon" sizes="114x114" href="/assets/icons/apple-icon-114x114.png">
|
| <link rel="apple-touch-icon" sizes="120x120" href="/assets/icons/apple-icon-120x120.png">
|
| <link rel="apple-touch-icon" sizes="144x144" href="/assets/icons/apple-icon-144x144.png">
|
| <link rel="apple-touch-icon" sizes="152x152" href="/assets/icons/apple-icon-152x152.png">
|
| <link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-icon-180x180.png">
|
| <link rel="icon" type="image/png" href="/assets/icons/favicon-32x32.png" sizes="32x32">
|
| <link rel="icon" type="image/png" href="/assets/icons/android-icon-192x192.png" sizes="192x192">
|
| <link rel="icon" type="image/png" href="/assets/icons/favicon-96x96.png" sizes="96x96">
|
| <link rel="icon" type="image/png" href="/assets/icons/favicon-16x16.png" sizes="16x16">
|
| <script src="/js/Admin/jquery-3.3.1.js"></script>
|
| <link rel="manifest" href="/assets/icons/manifest.json">
|
|
|
| <link href="/css/Admin/daterangepicker.css" rel="stylesheet" type="text/css" />
|
| <link href="/css/Admin/jquery-ui.min.css" rel="stylesheet" />
|
| <link href="/css/Admin/islg_font-awesome.min.css" rel="stylesheet" />
|
| <link href="/assets/fonts/FontAwesome/web-fonts-with-css/css/fontawesome-all.css" rel="stylesheet" />
|
|
|
|
|
|
|
| <link rel="stylesheet" href="/assets/styles/sassquatch.css">
|
| <link href="/css/Common.css" rel="stylesheet" />
|
| <script src="/js/JQTree/reorder.js"></script>
|
| <script src="/js/JQTree/tree-reorder.js"></script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| </head>
|
| <body cz-shortcut-listen="true">
|
| <a class="skip-link" href="#main-content">Skip to main content</a>
|
| <header class="header">
|
|
|
|
|
| <div class="container container--full-width">
|
| <div class="header__utility">
|
|
|
| <nav class="nav nav--utility">
|
| <ul class="nav__menu">
|
| <li>
|
| <div class="dropdown dropdown--overlay">
|
| <a href="#" id="dvNotificationsData" class="dropdown__toggle unsavedChanges" data-attach-icon-before="fas fa-bell" role="button" aria-expanded="false" aria-controls="dvNotificationsData-1">
|
| Notifications
|
| <span class="indicator notificationClassIndicator"></span>
|
| </a>
|
| <div id="dvNotificationsData-1" class="dropdown__content" role="region" aria-expanded="false" aria-labelledby="dvNotificationsData">
|
| <ul class="nav__submenu dvNotificationsDatas-1"></ul>
|
| </div>
|
| </div>
|
| </li>
|
| <li>
|
| <div class="dropdown dropdown--overlay" id="manageMetaFieldAndAdmins">
|
| </div>
|
| </li>
|
| <li>
|
| <div class="dropdown dropdown--overlay">
|
| <a href="#" id="utility-dropdown-control-3" class="dropdown__toggle" data-attach-icon-before="fas fa-user" role="button" aria-expanded="false" aria-controls="utility-dropdown-3">
|
| My Account
|
| <i class="fal fa-angle-down" aria-hidden="true"></i>
|
| </a>
|
| <div id="utility-dropdown-3" class="dropdown__content" role="region" aria-expanded="false" aria-labelledby="utility-dropdown-control-3">
|
| <ul class="nav__submenu">
|
| <li class="nav__submenu-link">
|
| <a class="unsavedChanges" href="/Admin/AdminUser/Profile/">My account</a>
|
| </li>
|
| <li class="nav__submenu-link">
|
| <a class="unsavedChanges" href="/Admin/Home/Logout/">Logout</a>
|
| </li>
|
| </ul>
|
| </div>
|
| </div>
|
| </li>
|
| </ul>
|
| </nav>
|
| </div>
|
| <div class="header__menu">
|
|
|
| <div class="header__brand">
|
| <a href="/Admin/Dashboard/Index"><img src="/assets/images/ISLG.svg" class="header__logo" alt="Investor-State LawGuide"></a>
|
| </div>
|
| <div class="header__nav-wrapper">
|
| <div class="nav nav--primary">
|
| <ul class="nav__menu">
|
| <li><a class="unsavedChanges clsHeaderMenus" href="/Admin/Dashboard/Index">Home</a></li>
|
| <li>
|
| <div class="dropdown dropdown--overlay">
|
| <a href="#" id="primary-dropdown-control-1" class="dropdown__toggle" role="button" aria-expanded="false" aria-controls="primary-dropdown-1">
|
| Master Lists
|
| <i class="fal fa-angle-down" aria-hidden="true"></i>
|
| </a>
|
| <div id="primary-dropdown-1" class="dropdown__content" role="region" aria-expanded="false" aria-labelledby="primary-dropdown-control-1">
|
| <ul class="nav__submenu">
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/AllDocumentList">All</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/TreatiesList">Treaties</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/ArbitrationRuleList">Arbitration Rules</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/DisputeList">Disputes</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/DisputeDocument">Dispute Documents</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/NonInvestmentTreatyDocumentsList">Non-Investment Treaty Documents</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/PublicationList">Publications</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/PeopleList">People</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/CountriesList">Countries</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/OrganizationList">Organizations</a></li>
|
| <li><a class="unsavedChanges clearLocalStorage" href="/Admin/ContentTypeData/AdministeringInstitutionsList">Administering Institutions</a></li>
|
| </ul>
|
| </div>
|
| </div>
|
| </li>
|
| <li id="manageMasterTreeReports" style="display:none">
|
| <div class="dropdown dropdown--overlay">
|
| <a href="#" id="primary-dropdown-control-2" class="dropdown__toggle clsHeaderMenus" role="button" aria-expanded="false" aria-controls="primary-dropdown-2">
|
| Master Tree and Reports
|
| <i class="fal fa-angle-down" aria-hidden="true"></i>
|
| </a>
|
| <div id="primary-dropdown-2" class="dropdown__content" role="region" aria-expanded="false" aria-labelledby="primary-dropdown-control-2">
|
| <ul class="nav__submenu">
|
| <li><a class="unsavedChanges" href="/Admin/SubjectNavigator/Index">Subject Navigator</a></li>
|
| <li><a class="unsavedChanges" href="/Admin/ArticleCitator/Index">Article Citator</a></li>
|
| <li><a class="unsavedChanges" href="/Admin/JurisprudenceCitator/Index">Jurisprudence Citator</a></li>
|
| <li><a class="unsavedChanges" href="/Admin/PublicationsCitator/Index">Publication Citator</a></li>
|
| <li><a class="unsavedChanges" href="/Admin/TermsAndPhrases/Index">Terms & Phrases</a></li>
|
| <li><a class="unsavedChanges" href="/Admin/Report/Index">Reports</a></li>
|
| </ul>
|
| </div>
|
| </div>
|
| </li>
|
| <li id="manageGroupUser">
|
| <a id="aGroupSubcUser" href="/Admin/Group/index" class="clsHeaderMenus unsavedChanges">Users</a>
|
| </li>
|
| <li>
|
| <a href="#" class="clsHeaderMenus unsavedChanges">Content</a>
|
| </li>
|
| </ul>
|
| </div>
|
| </div>
|
| </div>
|
| </div>
|
| </header>
|
|
|
| <script type="text/javascript">
|
| $(document).ready(function (e) {
|
| renderManageAdminsAndMetaFields();
|
| checkManageMasterAndReportPermission();
|
| });
|
|
|
| function renderManageAdminsAndMetaFields() {
|
| $.ajax({
|
| url: "/Admin/Dashboard/GetLeftSideBarMenuForMyAssignedTask",
|
| type: "GET",
|
| async: false,
|
| cache: false,
|
| success: function (result) {
|
| var customHTML = "";
|
| if (result != null) {
|
| customHTML = "<div id='utility-dropdown-2' class='dropdown__content' role='region'" +
|
| "aria-expanded='false' aria-labelledby='utility-dropdown-control-2'><ul class='nav__submenu'>";
|
| if (result.IsManageAdmin === true) {
|
| customHTML = customHTML + "<li class='nav__submenu-link'><a class='unsavedChanges' href='/Admin/AdminUser/Index'> Manage admins</a ></li>";
|
| }
|
| if (result.IsManageMetaFields === true) {
|
| customHTML = customHTML + "<li class='nav__submenu-link'> <a class='unsavedChanges' href='/Admin/DocumentContentType/Index'>Manage meta-fields</a></li>";
|
| }
|
| if (result.IsManageSubscribers === true) {
|
| customHTML = customHTML + "<li class='nav__submenu-link'> <a class='unsavedChanges' href='/Admin/Subscriber/UserValue'>Manage user values</a></li>";
|
| }
|
|
|
|
|
| customHTML = customHTML + " </ul></div>";
|
| if ($(customHTML).find('li').length > 0) {
|
| $('#manageMetaFieldAndAdmins').append("<a href='#' id='utility-dropdown-control-2'" +
|
| "class='dropdown__toggle' data-attach-icon-before='fas fa-cog' role='button'" +
|
| "aria-expanded='false' aria-controls='utility-dropdown-2'>" +
|
| "Manage<i class= 'fal fa-angle-down' aria-hidden='true'></i></a>");
|
| }
|
| $('#manageMetaFieldAndAdmins').append(customHTML);
|
|
|
| if (result.IsManageSubscribers) {
|
| $('#manageGroupUser').show();
|
| }
|
| else {
|
| $('#manageGroupUser').hide();
|
| }
|
| }
|
| }
|
| });
|
| }
|
|
|
| $(document).on("click", ".clearLocalStorage", function () {
|
|
|
| ''
|
|
|
|
|
|
|
| //This clear localStorage for peopel master
|
| localStorage.removeItem("hdnPeopleSearch");
|
| localStorage.removeItem("hdnOrganazationId");
|
| localStorage.removeItem("hdnOrganazation");
|
| localStorage.removeItem("hdnNationalityId");
|
| localStorage.removeItem("hdnNationality");
|
| localStorage.removeItem("hdnResidencyId");
|
| localStorage.removeItem("hdnResidency");
|
| localStorage.removeItem("hdnBarAdmissionId");
|
| localStorage.removeItem("hdnBarAdmission");
|
| localStorage.removeItem("hdnLanguageId");
|
| localStorage.removeItem("hdnLanguage");
|
| localStorage.removeItem("hdnSponsoredId");
|
| localStorage.removeItem("hdnSponsored");
|
|
|
| //This clear localStorage for Treaties & ARB Rules master
|
| localStorage.removeItem("hdnTreatiesSearch");
|
| localStorage.removeItem("hdnPartiestoTreatyId");
|
| localStorage.removeItem("hdnPartiestoTreaty");
|
| localStorage.removeItem("hdnActiveInactiveId");
|
| localStorage.removeItem("hdnActiveInactive");
|
| localStorage.removeItem("hdnArbitrationRuleSearch");
|
| localStorage.removeItem("hdnIssuingOrganizationId");
|
| localStorage.removeItem("hdnIssuingOrganization");
|
|
|
| localStorage.removeItem("hdnDisputeDocumentSearch");
|
| localStorage.removeItem("hdnDocumentTypesId");
|
| localStorage.removeItem("hdnDocumentTypes");
|
|
|
| localStorage.removeItem("hdnDisputeSearch");
|
| localStorage.removeItem("hdnRespondentStatesId");
|
| localStorage.removeItem("hdnRespondentStates");
|
| localStorage.removeItem("hdnApplicableTreatysId");
|
| localStorage.removeItem("hdnApplicableTreatys");
|
| localStorage.removeItem("hdnApplicableRulesId");
|
| localStorage.removeItem("hdnApplicableRules");
|
|
|
| localStorage.removeItem("hdnNonInvestmentDisputeSearch");
|
| localStorage.removeItem("hdnNonInvestmentTypeOfDisputeId");
|
| localStorage.removeItem("hdnNonInvestmentTypeOfDispute");
|
|
|
| localStorage.removeItem("hdnPublicationSearch");
|
| localStorage.removeItem("hdnPublicationCategoryId");
|
| localStorage.removeItem("hdnPublicationCategory");
|
|
|
| localStorage.removeItem("hdnCountriesSearch");
|
| localStorage.removeItem("hdnGroupingEconomicUnionsId");
|
| localStorage.removeItem("hdnGroupingEconomicUnions");
|
| localStorage.removeItem("hdnRegionId");
|
| localStorage.removeItem("hdnRegion");
|
| localStorage.removeItem("hdnIncomeId");
|
| localStorage.removeItem("hdnIncome");
|
|
|
| //common item
|
| localStorage.removeItem("hdnStatusId");
|
| localStorage.removeItem("hdnStatus");
|
| localStorage.removeItem("hdnUpdatedById");
|
| localStorage.removeItem("hdnUpdatedBy");
|
| localStorage.removeItem("hdnDateFrom");
|
| localStorage.removeItem("hdnDateTo");
|
|
|
| // Adminstrating Institution
|
| localStorage.removeItem("hdnInstitutionSearch");
|
|
|
|
|
| //This clear localStorage for organization master
|
| localStorage.removeItem("hdnOrganizationSearch");
|
| localStorage.removeItem("hdnType");
|
| localStorage.removeItem("hdnTypeId");
|
| localStorage.removeItem("hdnCountry");
|
| localStorage.removeItem("hdnCountryId");
|
| localStorage.removeItem("hdnSponsored");
|
| localStorage.removeItem("hdnSponsoredId");
|
| localStorage.removeItem("hdnIssuingOrganization");
|
|
|
| //all master filter
|
| localStorage.removeItem("hdnDocument_Dispute_Item");
|
| localStorage.removeItem("hdnUIN");
|
| localStorage.removeItem("hdnItemCategoryId");
|
| localStorage.removeItem("hdnItemCategory");
|
| localStorage.removeItem("hdnSelectedItemCategaory");
|
| localStorage.removeItem("hdnSubCategory");
|
| localStorage.removeItem("hdnSubCategory__DrpIds");
|
| localStorage.removeItem("hdnSubCategory_DocTypeIds");
|
| localStorage.removeItem("hdnStatusId");
|
| localStorage.removeItem("hdnStatus");
|
| localStorage.removeItem("hdnpublishId");
|
| localStorage.removeItem("hdnpublish");
|
| localStorage.removeItem("hdnUpdatedById");
|
| localStorage.removeItem("hdnUpdatedBy");
|
| localStorage.removeItem("hdnDateFrom");
|
| localStorage.removeItem("hdnDateTo");
|
| localStorage.removeItem("hdnParentfieldIds");
|
| localStorage.removeItem("hdnMetafieldIds");
|
|
|
| });
|
|
|
| // added by Janak Thakkar : 27-10-2020
|
| function checkManageMasterAndReportPermission() {
|
| $.ajax({
|
| url: "/Admin/AdminUser/GetAdminUserPermission",
|
| type: "GET",
|
| dataType: "json",
|
| data: {},
|
| success: function (data) {
|
| if (data !== null) {
|
| if (data.IsManageMasterListandReports) {
|
| $("#manageMasterTreeReports").show();
|
| }
|
| }
|
| }
|
| });
|
| }
|
| </script>
|
| <style>
|
| #documentStateDynamicRender .nav__menu li a {
|
| text-transform: initial !important;
|
| }
|
|
|
| #myAssignedTaskRender .nav__menu li a {
|
| text-transform: initial !important;
|
| }
|
| </style>
|
| <aside id="sidebar-slideout" class="sidebar open" aria-expanded="true" aria-labelledby="sidebar-slideout-control">
|
| <div class="sidebar__controls sidebar__controls--main">
|
| <button class="button button--icon sidebar__toggle open" aria-controls="sidebar-slideout" aria-expanded="true"><i class="fal fa-angle-double-right" aria-hidden="true"></i><span class="webaim-hidden">Toggle Sidebar</span></button>
|
| </div>
|
| <div class="sidebar__content-wrapper">
|
| <div class="sidebar__content">
|
| <nav class="nav nav--sidebar">
|
| <ul class="nav__menu" id="allAssignTask">
|
| <li>
|
| <i class="fas fa-caret-right" aria-hidden="true"></i>
|
| <a href="/Admin/Dashboard/AllAssignedTasks/" class="clsSideBarDataLink">All Tasks Assigned</a>
|
| </li>
|
| </ul>
|
| <span class="nav--sidebar__heading" id="myAssignedTaskRender"></span>
|
|
|
| <span class="nav--sidebar__heading" id="documentStateDynamicRender"></span>
|
|
|
| </nav>
|
| <hr>
|
| <div class="sidebar__controls">
|
| <button class="button button--icon sidebar__toggle open" aria-controls="sidebar-slideout" aria-expanded="true"><i class="fal fa-angle-double-right" aria-hidden="true"></i><span class="webaim-hidden">Toggle Sidebar</span></button>
|
| </div>
|
| </div>
|
| </div>
|
| </aside>
|
|
|
| <script type="text/javascript">
|
|
|
| $(document).ready(function (e) {
|
| renderLeftSideIcons();
|
| renderLeftSideDocumentState();
|
| renderMyAssignedTask();
|
| });
|
|
|
| function renderLeftSideIcons() {
|
| $.ajax({
|
| url: "/Admin/Dashboard/GetPermissionCountForLeftSideBar",
|
| type: "GET",
|
| async: false,
|
| success: function (result) {
|
| if (result == 0)
|
| {
|
| $(".sidebar__toggle")[0].click();
|
| $(".sidebar__toggle").hide();
|
| }
|
| }
|
| });
|
| }
|
|
|
| function renderLeftSideDocumentState() {
|
| $.ajax({
|
| url: "/Admin/Dashboard/GetLeftSideBarMenuForDocumentState",
|
| type: "GET",
|
| async: false,
|
| success: function (result) {
|
| var customHTML = "";
|
| if (result.length > 0) {
|
| $('#documentStateDynamicRender').text("Document States");
|
| $('#documentStateDynamicRender').append("<br><hr>");
|
| customHTML = "<ul class='nav__menu'>";
|
| for (var i = 0; i < result.length; i++) {
|
| customHTML = customHTML + "<li><i class='fas fa-caret-right' aria-hidden='true'></i><a href='javascript:void(0)' class='documentStateHyperLink clsSideBarDataLink' data-statusid=" + result[i].DocumentStatusId + " data-statusKey=" + result[i].StatusKey + " data-tasklistid=" + result[i].TaskId + " data-adminUser='false' >" + result[i].DocumentStatus + "</a ></li > "
|
| }
|
| customHTML = customHTML + "</ul>";
|
| $('#documentStateDynamicRender').append(customHTML);
|
| }
|
| }
|
| });
|
| }
|
|
|
| $(document).delegate(".documentStateHyperLink", "click", function (e) {
|
| if (unsavedChanges(e)) {
|
| var myAssignCount = $(this).parents("#myAssignedTaskRender").length;
|
| $.ajax({
|
| url: "/Admin/DocumentState/DocumentGridStatusBase",
|
| type: "GET",
|
| data:
|
| {
|
| statusId: $(this).attr('data-statusid'),
|
| statusKey: $(this).attr('data-statuskey').trim(),
|
| IsadminUser: $(this).attr('data-adminUser'),
|
| currentRequestStatusName: $(this).text(),
|
| TaskListId: $(this).attr('data-tasklistId'),
|
| MyAssignCount: myAssignCount
|
| },
|
| beforeSend: function () {
|
| ProgressBar.show($("body"));
|
| },
|
| success: function (data) {
|
| $("#page-content").html(data);
|
| $('html, body').scrollTop(0);
|
| ProgressBar.hide($("body"));
|
| },
|
| error: function (data) {
|
| ProgressBar.hide($("body"));
|
| }
|
| });
|
| }
|
| });
|
|
|
| function unsavedChanges(e) {
|
| var activeElement;
|
| if ($('#tab-2').hasClass('active')) {
|
| activeElement = $('#tab-2');
|
| }
|
|
|
| if ($(activeElement).length > 0 && $(activeElement).hasClass('active')) {
|
| prvClickedElement = e.target;
|
| e.preventDefault();
|
| $('#BrowserBackButtonWarningDisplay').click();
|
| return false;
|
| }
|
| return true;
|
| }
|
|
|
| function disableBackButton() {
|
| history.pushState(null, null, location.href);
|
| window.onpopstate = function () {
|
| history.go(1);
|
| };
|
| }
|
|
|
| function enableBackButton() {
|
| history.pushState(null, null, location.href);
|
| window.onpopstate = function () {
|
| history.go(0);
|
| };
|
| }
|
|
|
| function renderMyAssignedTask() {
|
| $.ajax({
|
| url: "/Admin/Dashboard/GetLeftSideBarMenuForMyAssignedTask",
|
| type: "GET",
|
| async: false,
|
| cache: false,
|
| success: function (result) {
|
| var customHTML = "";
|
| if (result != null) {
|
|
|
| customHTML = "<ul class='nav__menu'>";
|
| if (result.IsEditDocuments === true) {
|
| customHTML = customHTML + "<li><i class='fas fa-caret-right' aria-hidden='true'></i><a href='javascript:void(0)' class='documentStateHyperLink clsSideBarDataLink' data-tasklistId='1' data-statusid='4,5' data-statusKey='EIP' data-adminUser='true'>Edit</a><span class='indicator'>" + result.EditCount + "</span></li > "
|
| }
|
| if (result.IsAnalyzeDataCapture === true) {
|
| customHTML = customHTML + "<li><i class='fas fa-caret-right' aria-hidden='true'></i><a href='javascript:void(0)' class='documentStateHyperLink clsSideBarDataLink' data-tasklistId='2' data-statusid='6,7' data-statusKey='AIPDC' data-adminUser='true'>Analyze : Data Capture</a><span class='indicator'>" + result.ADCCount + "</span></li > "
|
| }
|
| if (result.IsAnalyzeSubjectNavigator === true) {
|
| customHTML = customHTML + "<li><i class='fas fa-caret-right' aria-hidden='true'></i><a href='javascript:void(0)' class='documentStateHyperLink clsSideBarDataLink' data-tasklistId='3' data-statusid='6,8' data-statusKey='AIPSN' data-adminUser='true'>Analyze : Subject Navigator</a><span class='indicator'>" + result.ASNCount + "</span></li > "
|
| }
|
| if (result.IsReviewDataCapture === true) {
|
| customHTML = customHTML + "<li><i class='fas fa-caret-right' aria-hidden='true'></i><a href='javascript:void(0)' class='documentStateHyperLink clsSideBarDataLink' data-tasklistId='4' data-statusid='9' data-statusKey='RFRDC' data-adminUser='true'>Review : Data Capture</a><span class='indicator'>" + result.RDCCount + "</span></li > "
|
| }
|
| if (result.IsReviewSubjectNavigator === true) {
|
| customHTML = customHTML + "<li><i class='fas fa-caret-right' aria-hidden='true'></i><a href='javascript:void(0)' class='documentStateHyperLink clsSideBarDataLink' data-tasklistId='5' data-statusid='10' data-statusKey='RFRSN' data-adminUser='true'>Review : Subject Navigator</a><span class='indicator'>" + result.RSNCount + "</span></li > "
|
| }
|
| if (result.IsApproveandAssignTask === true) {
|
| customHTML = customHTML + "<li><i class='fas fa-caret-right' aria-hidden='true'></i><a href='javascript:void(0)' class='documentStateHyperLink clsSideBarDataLink' data-tasklistId='6' data-statusid='11' data-statusKey='RFFR' data-adminUser='true'>Approve</a><span class='indicator'>" + result.ApproveCount + "</span></li > "
|
| }
|
| customHTML = customHTML + "</ul>";
|
| if ($(customHTML).find('li').length > 0) {
|
| $('#myAssignedTaskRender').text("My Assigned Task");
|
| $('#myAssignedTaskRender').append("<br><hr>");
|
| }
|
| $('#myAssignedTaskRender').append(customHTML);
|
| }
|
|
|
| if (result.IsApproveandAssignTask) {
|
| $('#allAssignTask').show();
|
| }
|
| else {
|
| $('#allAssignTask').hide();
|
| }
|
| }
|
| });
|
| }
|
|
|
|
|
|
|
| </script>
|
|
|
| <div id="overlay"></div>
|
|
|
| <div>
|
| <style type="text/css">
|
| #popupMasterBulkAction .modelpopup-inner {
|
| max-height: 300px !important;
|
| }
|
|
|
| #tblArbitrationRule_wrapper {
|
| width: 100% !important;
|
| overflow: unset !important;
|
| }
|
|
|
| #page-content {
|
| overflow: inherit !important;
|
| }
|
|
|
| /* due to table unstructured only set this css in arbitartion page*/
|
| table.dataTable thead > tr > th.sorting_asc, table.dataTable thead > tr > th.sorting_desc, table.dataTable thead > tr > th.sorting, table.dataTable thead > tr > td.sorting_asc, table.dataTable thead > tr > td.sorting_desc, table.dataTable thead > tr > td.sorting {
|
| padding-right: 30px !important;
|
| }
|
|
|
| .table__scroll td:not(.table__fixed):not(.table__fixed--right) {
|
| white-space: unset !important;
|
| min-width: 200px !important;
|
| word-break: break-word;
|
| }
|
| </style>
|
|
|
| <main id="main-content" class="main main--sidebar-open">
|
| <section id="page-content">
|
| <input type="hidden" id="displayStart" name="displayStart" value="0" />
|
| <div class="container container--full-width">
|
| <form id="arbitrationRuleListForm" method="post" action="/Admin/ContentTypeData/ExportArbitrationRules">
|
| <input type="hidden" id="hdnExportType" name="hdnExportType" />
|
|
|
| <div class="grid grid--flex-md grid--flex-center">
|
| <div class="grid__col--md-8">
|
| <h1>Arbitration Rules</h1>
|
| </div>
|
| <div class="grid__col--md-4 text--right">
|
|
|
|
|
| <a title="Add New Arbitration Rule" id="docupload" class="button button--primary addEditContentTypeData" data-attach-icon-before="far fa-plus">Upload Document</a>
|
| </div>
|
| <div class="dropdown dropdown--overlay dropdown--inline pull-right">
|
| <button id="AddContent" class="button button--primary dropdown__toggle exportButtonWidth" type="button" data-attach-icon-before="fas fa-download" aria-expanded="false" aria-controls="ContentExport">Export</button>
|
| <div id="ContentExport" class="dropdown__content dropdown__content--popover" role="region" aria-expanded="false" aria-labelledby="AddContent" style="width:auto!important">
|
| <div id="ExistContent">
|
| <ul style="list-style-type: none;">
|
| <li>
|
| <a class="cursor--pointer" id="ExpotToExcelCurrent" onclick="return setExportTypeExcel('ExcelCurrent')">Current View</a>
|
| </li>
|
| <li>
|
| <a class="cursor--pointer" id="ExpotToExcel" onclick="return setExportTypeExcel('Excel')">All fields</a>
|
| </li>
|
| </ul>
|
| </div>
|
| </div>
|
| </div>
|
| </div>
|
| <hr>
|
| <div class="grid grid--flex-md grid--flex-center">
|
| <div id="documentupload">
|
|
|
|
|
|
|
| <style type="text/css">
|
| html {
|
| overflow-x: unset !important;
|
| }
|
|
|
| #page-content {
|
| overflow: unset !important;
|
| }
|
|
|
| #docupload {
|
| /*display:none;*/
|
| }
|
|
|
| .docuploadfieldset {
|
| display: none;
|
| }
|
|
|
| #documentupload {
|
| width: 100%;
|
| }
|
|
|
| #disputedocupload {
|
| display: none;
|
| height: 100%;
|
| cursor: pointer;
|
| }
|
|
|
| #uploadedfile {
|
| display: none;
|
| }
|
|
|
| #fieldsetcontainer {
|
| height: 300px;
|
| width: 98%;
|
| margin: 0 auto;
|
| border: dashed 1px #b1b0af;
|
| }
|
|
|
| .docuploadfieldset .fieldsettitle {
|
| margin-left: 1%;
|
| }
|
|
|
| .file-group {
|
| display: inline-block;
|
| width: 50%;
|
| }
|
|
|
| .fa-file-pdf-o.fa-5 {
|
| font-size: 35px;
|
| margin: 12px 16px;
|
| }
|
|
|
| .divfilesize {
|
| display: inline-block;
|
| width: 65px;
|
| vertical-align: top;
|
| }
|
|
|
| .sizeinfo {
|
| margin-left: 5px;
|
| font-size: 12px;
|
| }
|
|
|
| #uploadedfile {
|
| margin-top: 90px;
|
| display: none;
|
| }
|
|
|
| .dz-default.dz-message {
|
| text-align: center;
|
| padding-top: 128px;
|
| }
|
|
|
| #documentform {
|
| display: none;
|
| }
|
|
|
| .dz-preview {
|
| display: none;
|
| }
|
|
|
| .fixedpos {
|
| position: absolute;
|
| }
|
|
|
| #ProgressDiv {
|
| width: 98%;
|
| margin: 15px auto;
|
| display: none;
|
| }
|
|
|
| #ProgressDiv span {
|
| display: inline-block;
|
| font-size: 1em;
|
| font-weight: 600;
|
| line-height: 1.375;
|
| /*Commented by Janak Thakkar as discuss with Harsh Parikh*/
|
| /*text-transform: uppercase;*/
|
| color: #646569;
|
| }
|
|
|
| #ProgressDiv #ProgressBG {
|
| width: 100%;
|
| background-color: #e4e4e4;
|
| height: 16px;
|
| }
|
|
|
| #ProgressBG #docqualityprogress {
|
| width: 0%;
|
| height: 30px;
|
| background-color: #468bc9;
|
| height: 16px;
|
| }
|
|
|
| #ProgressBG #PDFFailStatus {
|
| display: none;
|
| }
|
|
|
| #pdfscoreper, #pdfscoremessage {
|
| font-style: italic;
|
| }
|
|
|
| #PDFFailStatus {
|
| margin-top: 10px;
|
| display: none;
|
| }
|
| </style>
|
|
|
|
|
| <div class="docuploadfieldset">
|
| <span class="fieldsettitle">
|
| Upload Document
|
| </span>
|
| <div class="inner_div">
|
| <div id="fieldsetcontainer">
|
| <div id="disputedocupload">
|
| <div class="dz-default dz-message">
|
| <h1>Drop files here or click to upload</h1> <br />
|
| </div>
|
| </div>
|
|
|
| <div id="uploadedfile">
|
| <div id="fileinfo">
|
| <div class="grid">
|
| <div class="grid__col--md-8 grid__col--offset-right-3">
|
| <div class="divfilesize">
|
| <i class="fa fa-file-pdf-o fa-5" aria-hidden="true"></i><br />
|
| <span class="sizeinfo">
|
| 10 MB
|
| </span>
|
| </div>
|
|
|
| <div class="form__group file-group">
|
| <label for="fileName" class="form__label">File Name<span style="color:#e62600"> *</span></label>
|
|
|
| <input type="text" class="form__input" isRequired="true" fieldName="filename" id="txtfilename" name="txtfilename" placeholder="Enter Value" validationtext="Please Enter File Name">
|
|
|
| <br /><label class="errorText error fixedpos"></label>
|
| </div>
|
|
|
| <a href="#" name="removefile" id="removefile">Remove File</a>
|
| </div>
|
| </div>
|
| </div>
|
| </div>
|
|
|
| </div>
|
| <div id="ProgressDiv">
|
| <span style="width:50%;text-align:left;" id="pdfstatus">PDF analysis in progress</span>
|
| <span style="width:49%;text-align:right;" id="pdfscoreper">1 %</span>
|
| <div id="ProgressBG">
|
| <div id="docqualityprogress"></div>
|
| </div>
|
| <div id="PDFFailStatus">
|
| <span style="width:50%;text-align:left;">PDF Quality Score: <span id="pdfscore"></span></span>
|
| <span style="width:49%;text-align:right;" id="pdfscoremessage">This PDF is not compatible with the conversion algorithm</span>
|
| </div>
|
| <div id="pdffailpagedisplay" style="border:solid 3px red;margin-top:10px;margin-bottom:10px;padding:10px;display:none">
|
|
|
| </div>
|
|
|
| <input type="hidden" id="hdnpdfstatus" />
|
| </div>
|
| </div>
|
| <a href="#cnfm-annulled" class="popup__toggle" style="display:none;" data-popup="cnfm-annull"></a>
|
| <div id="cnfm-annull" class="popup" style="display: none;">
|
| <div class="popup__content">
|
| <p><strong><span id="filename"></span></strong> file name is already used. Please rename the file name and upload again.</p>
|
| <button type="button" id="btnCancelsave" class="button button--primary popup__cancel">Ok</button>
|
| </div>
|
| </div>
|
| </div>
|
| <script src="/js/Admin/dropzone.js"></script>
|
|
|
| <script type="text/javascript">
|
| var myDropzone;
|
| var myfile;
|
| var pdffilename;
|
| var intervalcall;
|
| $(document).ready(function () {
|
| Dropzone.autoDiscover = false;
|
| myDropzone = new Dropzone("div#disputedocupload", { url: 'test/test', autoProcessQueue: false, maxFiles: 1, acceptedFiles: '.pdf' });
|
| myDropzone.on("addedfiles", function (file) {
|
| setTimeout(function () {
|
| loaddocumentreadyfields();
|
| if (file[0].type !== "application/pdf") {
|
| $.notify({ message: 'Please upload pdf file only.' }, { type: 'warning', placement: { from: "top", align: "center" } });
|
| myDropzone.removeAllFiles();
|
| }
|
| else {
|
| var filestatus = checkfilename(file[0].name);
|
| if (!filestatus.status) {
|
| setTimeout(function () {
|
| if (filestatus.type == 'CA') {
|
| $('#filename').text(file[0].name);
|
| $('[data-popup="cnfm-annull"]').click();
|
| }
|
| else if (filestatus.type == 'error') {
|
| $.notify({ message: 'There is error in Uploading File.' }, { type: 'warning', placement: { from: "top", align: "center" } });
|
| }
|
| else {
|
| $.notify({ message: 'This File is already being uploaded please Upload Another File.' }, { type: 'warning', placement: { from: "top", align: "center" } });
|
| }
|
| }, 50);
|
| myDropzone.removeAllFiles();
|
| } else {
|
| $('#docqualityprogress').removeAttr("style").css('width', '1%');
|
| $('#pdfstatus').text('PDF analysis in progress');
|
| $(".btnSaveDocument").attr("disabled", true);
|
| $('#pdfscoreper').css('color', '').css('font-style', '').text('1%');
|
| pdffilename = file[0].name;
|
| var formdata = new FormData();
|
| formdata.append("file", myDropzone.getAcceptedFiles()[0]);
|
| $.ajax({
|
| url: "/Admin/ContentTypeData/checkpdfqualitycheck",
|
| data: formdata,
|
| crossDomain: true,
|
| processData: false,
|
| contentType: false,
|
| //dataType: "application/json; charset=utf-8",
|
| dataType: "json",
|
| type: "POST",
|
| success: function (data) {
|
| if (data != 0) {
|
|
|
| }
|
| },
|
| error: function (passParams) {
|
|
|
| //$('#ProgressDiv').hide();
|
| }
|
| });
|
| intervalcall = window.setInterval(function () {
|
| GetProcess();
|
| }, 1000);
|
| $('#ProgressDiv').show();
|
|
|
| myfile = file;
|
| $('#uploadedfile #txtfilename').val(file[0].name);
|
| $('#uploadedfile .sizeinfo').text(formatBytes(file[0].size));
|
| $('#disputedocupload').hide();
|
| $('#uploadedfile').show();
|
| $('#documentform').show();
|
| $('#txtfilename').siblings('.errorText').text('');
|
| if ($('#fileinfo').is(":visible")) {
|
| $("#dvSkipUpload").hide();
|
| }
|
| else {
|
| myfile = file;
|
| $('#uploadedfile #txtfilename').val(file[0].name);
|
| $('#uploadedfile .sizeinfo').text(formatBytes(file[0].size));
|
| $('#disputedocupload').hide();
|
| $('#uploadedfile').show();
|
| $('#documentform').show();
|
| $('#txtfilename').siblings('.errorText').text('');
|
| if ($('#fileinfo').is(":visible")) {
|
| $("#dvSkipUpload").hide();
|
| }
|
| loaddocumentreadyfields();
|
|
|
| }
|
| }
|
| }
|
| }, 10);
|
| });
|
| });
|
|
|
| function move(per) {
|
| if (per == 0) {
|
| per = 1;
|
| var elem = document.getElementById("docqualityprogress");
|
| var width = 1;
|
| var id = setInterval(frame, 10);
|
| function frame() {
|
| if (width >= 100) {
|
| clearInterval(id);
|
| } else {
|
| width++;
|
| elem.style.width = width + "%";
|
| }
|
| }
|
| }
|
| }
|
| $('#removefile').click(function () {
|
| myDropzone.removeAllFiles();
|
| $('#disputedocupload').show();
|
| $('#uploadedfile').hide();
|
| $('#documentform').hide();
|
| $('#txtfilename').val('');
|
| clearform();
|
| if (($('#disputedocupload').is(":visible")) && ($('#fileinfo').is(":hidden"))) {
|
| $("#dvSkipUpload").show();
|
| }
|
|
|
| $('#docqualityprogress').removeAttr("style").css('width', '1%');
|
| $('#pdfstatus').text('PDF analysis in progress');
|
| $('#pdfscoreper').css('color', '').css('font-style', '').text('1%');
|
| $('#pdfscore').html('');
|
| $('#PDFFailStatus').removeAttr('style');
|
| $('#ProgressDiv').removeAttr('style');
|
| $('.btnContinuePDF').show();
|
| $('.btnSaveDocument').show();
|
| $('.btnproceedwithoutconversion').hide();
|
| $(".btnSaveDocument").attr("disabled", false);
|
| $("#pdffailpagedisplay").html("");
|
| $("#pdffailpagedisplay").hide();
|
| });
|
| function formatBytes(bytes, decimals) {
|
| if (bytes == 0) return '0 Bytes';
|
| var k = 1024,
|
| dm = decimals <= 0 ? 0 : decimals || 2,
|
| sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'],
|
| i = Math.floor(Math.log(bytes) / Math.log(k));
|
| return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
| }
|
|
|
|
|
| function GetProcess() {
|
|
|
| $.ajax({
|
| url: '/Admin/ContentTypeData/getpdfqualityscore',
|
| type: "GET",
|
| data:
|
| {
|
| file: pdffilename
|
| },
|
| beforeSend: function () {
|
|
|
| },
|
| success: function (data) {
|
|
|
| if (data != null && data.Percentage>0) {
|
| $('#pdfscoreper').text(data.Percentage + ' %');
|
| $('#docqualityprogress').css('width', data.Percentage + '%');
|
| if (data.Percentage.indexOf('100') >= 0) {
|
| window.clearInterval(intervalcall);
|
| if (data.Score >= 50) {
|
| $('#pdfstatus').text('PDF ready for conversion');
|
| $('#pdfscoreper').html('✔').css('color', '#47ff47;').css('font-style', 'normal');
|
| $('#docqualityprogress').css('background-color', '#47ff47;');
|
| $('.btnSaveDocument').removeClass('pointer-disable');
|
| //$('.btnContinuePDF').hide();
|
| $('.btnSaveDocument').show();
|
| $('.btnproceedwithoutconversion').hide();
|
| $(".btnSaveDocument").attr("disabled", false);
|
| }
|
| else {
|
| $('#pdfstatus').text('PDF incompatible');
|
| $('#pdfscoreper').html('✖').css('color', '#d00000;').css('font-style','normal');
|
| $('#docqualityprogress').css('background-color', '#d00000;');
|
| $('#pdfscore').text(data.Score + '%');
|
| $("#pdffailpagedisplay").show();
|
| if (data.Badpages != "") {
|
| $('#pdffailpagedisplay').html("<strong> PDF quality issues found: </strong><br/>" + data.Badpages);
|
| }
|
| else {
|
| $('#pdffailpagedisplay').html("<strong> PDF quality issues found: </strong> 0." );
|
| }
|
|
|
| $('#PDFFailStatus').show();
|
| $('.btnContinuePDF').hide();
|
| $('.btnSaveDocument').hide();
|
| $('.btnproceedwithoutconversion').show();
|
| }
|
| }
|
| }
|
| },
|
| error: function (passParams) {
|
|
|
| }
|
| });
|
|
|
| }
|
| </script>
|
| </div>
|
|
|
| </div>
|
| <div class="grid grid--flex-md grid--flex-center">
|
| <div class="grid__col--md-12">
|
| <div id="dvSkipUpload" style="display:none;">
|
| <div class="text--right">
|
| <button id="btnSkipUpload" class="button button--primary" type="button" typeof="button">Skip Upload</button>
|
| </div>
|
| </div>
|
| </div>
|
| </div>
|
| <div id="documentform">
|
| <div class="grid grid--flex-md grid--flex-center" style="align-items:baseline;">
|
| <div class="grid__col--md-3">
|
| <label class="form__label">
|
| Title
|
| <span style="color:#e62600"> *</span>
|
| </label>
|
| <input type="text" class="form__input docmetafield" isRequired="true" validationtext="Please Enter Title" metafieldid="22" value="" id="Title" name="Title" placeholder="Enter Title">
|
| <label class="errorText"></label>
|
| </div><br />
|
| </div>
|
| <div class="grid grid--flex-md grid--flex-center" style="align-items:baseline;">
|
| <div class="grid__col--md-3">
|
| <label class="form__label">
|
| UIN
|
| <span style="color:#e62600"> *</span>
|
| </label>
|
| <input type="text" class="form__input UINValidation docmetafield uininput" validationtext="Please Enter UIN" metafieldid="23" isRequired="true" value="" id="UIN" name="UIN" placeholder="Enter UIN">
|
| <label class="errorText"></label><br />
|
| </div>
|
| </div>
|
| <div id="ChkAlternateVersion" class="grid grid--flex-md grid--flex-center">
|
| <div class="grid__col--6">
|
| <label class="form__label">
|
| <input type="checkbox" id="IsAlternativeVersion" name="IsAlternativeVersion" class="form__checkbox" /><span>This is an alternative version of existing document</span>
|
| </label>
|
| </div>
|
| </div>
|
|
|
| <div class="grid grid--flex-md grid--flex-center divanotherVersionSearch" id="anotherVersionSearch">
|
| <div class="grid__col--6">
|
| <label class="form__label">
|
| <span>Select another version of this document</span>
|
| </label>
|
| <div>
|
| <input id="AnotherVersionDocumentList" type="text" placeholder="Please select" class="form__input" title="Please select another version of this document" /><i class="fal fa-search input-search"></i>
|
| <br />
|
| <label class="errorText AnotherDocumentError"></label>
|
| </div>
|
| </div>
|
| </div>
|
| <hr />
|
| <div class="grid grid--flex-md grid--flex-center">
|
| <div class="grid__col--md-8">
|
| </div>
|
| <div class="grid__col--md-4 text--right" id="documentbuttonform">
|
| <button class="button button--neutral btnCancelDocument" type="button" statusid="1" typeof="button">Cancel</button>
|
| <button class="button button--primary btnContinuePDF" type="button" statusid="4" typeof="button">Continue with PDF</button>
|
| <button class="button button--primary btnSaveDocument" type="button" statusid="2" typeof="button">Start Conversion</button>
|
| <button class="button button--primary btnContinuePDF btnproceedwithoutconversion" type="button" statusid="4" typeof="button" style="display:none">Proceed without Conversion</button>
|
| </div>
|
| <div class="grid__col--md-4 text--right" id="documentskipbuttonform" style="display:none;">
|
| <button id="btnBackDocument" class="button button--neutral" type="button" statusid="" typeof="button">Back to Upload</button>
|
| <button class="button button--primary btnContinueDetail" type="button" statusid="" typeof="button">Continue</button>
|
| </div>
|
| </div>
|
| </div>
|
|
|
| <div id="disputedocumentlist">
|
| <div class="grid grid--flex-md grid--flex-center">
|
| <div class="grid__col--md-4">
|
| <div class="form__group form__group--inline-search-clear">
|
| <input id="ArbitrationRuleSearch" name="ArbitrationRuleSearch" class="form__input" placeholder="Arbitration Rule Name or UIN" />
|
| <i class="fal fa-search"></i>
|
| <button class="form__clear cursor--pointer" type="button" onclick="resetSearch()">Clear</button>
|
| <input type="hidden" id="hdnArbitrationRuleSearch" name="hdnArbitrationRuleSearch" />
|
| </div>
|
| </div>
|
| <strong><a class="cursor--pointer" data-attach-icon-after="fa fa-angle-down filterIcon" onclick="openFilterData()">Filters <span id="filtercount"></span> </a> | </strong>
|
| <strong><a class="cursor--pointer" onclick="clearDataFilter()">Clear Filters</a></strong>
|
| </div>
|
| <input type="hidden" data-val="true" data-val-required="The DocumentContentTypeId field is required." id="DocumentContentTypeId" name="DocumentContentTypeId" value="13" />
|
| <input type="hidden" data-val="true" data-val-required="The ContentTypeDataMasterId field is required." id="ContentTypeDataMasterId" name="ContentTypeDataMasterId" value="0" />
|
| <div class="tabs__content-container">
|
| <div class="tabs__content active" style="padding-top:0!important">
|
|
|
| <div class="container" id="divFilterData" style="display:none;">
|
| <div class="box">
|
| <h2>Filter by</h2>
|
| <div class="grid">
|
| <div class="grid__col--md-6">
|
| <div class="form__group">
|
| <label for="Issuing Organization" class="form__label">Issuing Organization</label>
|
| <input id="AutoCompleteIssuingOrganization" type="text" class="form__input noCloseSearch" placeholder="Select Issuing Organization" title="Issuing Organization" />
|
| <i class="fal fa-search input-search"></i>
|
| <input type="hidden" id="hdnIssuingOrganizationId" name="hdnIssuingOrganizationId" />
|
| <input type="hidden" id="hdnIssuingOrganization" name="hdnIssuingOrganization" />
|
| </div>
|
| </div>
|
| <div class="grid__col--md-6">
|
| <div class="form__group">
|
| <label for="account-type" class="form__label">Status</label>
|
| <input id="AutoCompleteStatus" type="text" class="form__input noCloseSearch" placeholder="Select Status" title="Select Status" />
|
| <i class="fal fa-search input-search"></i>
|
| <input type="hidden" id="hdnStatusId" name="hdnStatusId" />
|
| <input type="hidden" id="hdnStatus" name="hdnStatus" />
|
| </div>
|
| </div>
|
| </div>
|
| <div class="grid">
|
| <div class="grid__col--md-6 padding-top-6">
|
| <label for="date-range-start" class="form__label">Last Updated Date Range </label>
|
| <div class="grid">
|
| <div class="grid__col--md-6">
|
| <input type="text" id="DateFrom" class="form__input form__date" placeholder="From date" autocomplete="off">
|
| <label id="dateFromError" for="DateFrom"></label>
|
| <input type="hidden" id="hdnDateFrom" name="hdnDateFrom" />
|
| </div>
|
| <div class="grid__col--md-6">
|
| <input type="text" id="DateTo" class="form__input form__date" placeholder="To date" autocomplete="off">
|
| <label id="dateToError" for="DateTo"></label>
|
| <input type="hidden" id="hdnDateTo" name="hdnDateTo" />
|
| </div>
|
| </div>
|
| </div>
|
| <div class="grid__col--md-6">
|
| <div class="form__group">
|
| <label for="account-type" class="form__label">Updated By</label>
|
| <input id="AutoCompleteUpdatedBy" type="text" class="form__input noCloseSearch" placeholder="Select Updated By" title="Select Updated By" />
|
| <i class="fal fa-search input-search"></i>
|
| <input type="hidden" id="hdnUpdatedById" name="hdnUpdatedById" />
|
| <input type="hidden" id="hdnUpdatedBy" name="hdnUpdatedBy" />
|
| </div>
|
| </div>
|
| </div>
|
| <div class="grid">
|
| <div class="grid__col--md-6">
|
| <label for="ActiveInactive" class="form__label">Active/Inactive</label>
|
| <select id="ActiveInactive" class="form__input">
|
| <option value="0">Please Select</option>
|
| <option value="1">Inactive</option>
|
| <option value="2">Active</option>
|
| </select>
|
| <input type="hidden" id="hdnActiveInactiveId" name="hdnActiveInactiveId" />
|
| <input type="hidden" id="hdnActiveInactive" name="hdnActiveInactive" />
|
| </div>
|
| </div>
|
|
|
| <div class="text--right">
|
| <button class="button button--text islgrebuildfilterbutton" type="button" onclick="clearDataFilter()">Clear filters</button>
|
| <button class="button button--primary islgrebuildfilterbutton" type="button" onclick="filterArbitrationRule(this.form)">Filter</button>
|
| </div>
|
| </div>
|
| </div>
|
| <input type="hidden" id="hdnPageNumber" name="hdnPageNumber" value="0" />
|
| <input type="hidden" id="hdnSortColumn" name="hdnSortColumn" />
|
| <input type="hidden" id="hdnSortOrder" name="hdnSortOrder" />
|
| <input type="hidden" id="hdnSearch" name="hdnSearch" />
|
|
|
| <div class="overlayPopUp" id="overlayPopupMasterBulkAction" style="display:none;"></div>
|
| <div class="modelpopup" id="popupMasterBulkAction" style="display:none;">
|
| <div class="modelpopup-inner">
|
| <div class="modelpopup-title">Change Active/InActive Status</div>
|
| <div id="divData">
|
| <p>
|
| You are about to change the status of <span id="dynamicGroupStatus"></span>.
|
| </p>
|
| <div class="col-md-12 form__group">
|
| <label class="form__label">Status<span class="form__label-required">*</span></label>
|
| <select id="BulkActionStatusPopup" class="form__input">
|
| <option value="0">Please Select</option>
|
| <option value="2">Active</option>
|
| <option value="1">InActive</option>
|
| </select>
|
| </div>
|
| <p class="error" id="errorStatus" style="display:none">Please select any options.</p>
|
| <div class="form__group pull-right">
|
| <button class="button button--neutral" onclick="statusPopupClose();" type="button" id="btnCancelGroupPopUpData">Cancel</button>
|
| <button class="button button--primary" type="button" onclick="btnSaveBulkMasterPopupData()">Change Status</button>
|
| </div>
|
| </div>
|
| </div>
|
| </div>
|
| <div class="grid__col">
|
| <button id="AddMasterBulkActions"
|
| style="display:none" class="button button--primary dropdown__toggle"
|
| type="button" onclick="statusPopupOpen()">
|
| Bulk Actions
|
| </button>
|
| </div>
|
|
|
| <div class="table__scroll">
|
| <div class="form-group">
|
| <div class="col-md-2">
|
| <select id="BulkActionMaster" class="form__input" disabled>
|
| <option value="0">Bulk Action</option>
|
| <option value="1">Change Status</option>
|
| </select>
|
| </div>
|
| </div>
|
|
|
| <table id="tblArbitrationRule" class="table tbl headersort">
|
| <thead>
|
| <tr>
|
| <th class="" scope="col">ContentTypeId</th>
|
| <th class="table__fixed table__checbox" scope="col"></th>
|
| <th class="table__fixed" scope="col">UIN </th>
|
| <th class="" scope="col">Arbitration Rule Name</th>
|
| <th class="" scope="col">Language</th>
|
| <th class="" scope="col">Status</th>
|
| <th class="" scope="col">Active/Inactive</th>
|
| <th class="" scope="col">Last Updated</th>
|
| <th class="" scope="col">Updated By</th>
|
| <th class="" scope="col">Alternate Documents</th>
|
| <th class="table__fixed--right" scope="col">Actions</th>
|
| </tr>
|
| </thead>
|
| </table>
|
| </div>
|
| </div>
|
| </div>
|
| </div>
|
| <input name="__RequestVerificationToken" type="hidden" value="CfDJ8EkrpiBr8ctDqPn1RgSPVpphqBGDnLX9wiN-h69idCNEapGvqI-UF1blNQim8XAi-Ej7wCXNR0mUj1Dw-Z8KuZ_MxOw5pJXOnzG4a6cvZ15u402OoqJycGHBPLZY3Fde-CElQ6aHI2k3ESuqse57Q9Q" /></form>
|
| </div>
|
| </section>
|
| </main>
|
| <link href="/css/Popup.css" rel="stylesheet" />
|
| <script type="text/javascript">
|
| var ProgressBar = function () {
|
| return {
|
| show: function (sourceBlock) {
|
| //$("#" + sourceBlockId).append("<div class='blockProcessBar'></div>");
|
| $(sourceBlock).append("<div class='overlay'></div>");
|
| },
|
| hide: function (sourceBlockId) {
|
| $(sourceBlockId).find(".overlay").fadeOut("slow", function () {
|
| $(this).remove();
|
| });
|
| }
|
| };
|
| }();
|
|
|
| $(document).ready(function () {
|
| if (localStorage.getItem("partialEditMasterId") != null && localStorage.getItem("partialEditMasterId") != '') {
|
| var contenttypedatamasterid = localStorage.getItem("partialEditMasterId");
|
| localStorage.removeItem("partialEditMasterId");
|
| EditMasterData(contenttypedatamasterid);
|
| }
|
|
|
| if ("0" != "0") {
|
| EditMasterData("0");
|
| }
|
|
|
| if ('False' == 'True') {
|
| $('.addEditContentTypeData').click();
|
| }
|
|
|
| // By Janak Thakkar : (To open entry in new tab)
|
| if (localStorage.getItem("partialview") != null && localStorage.getItem("partialview") != '') {
|
| var contenttypedatamasterid = localStorage.getItem("partialview");
|
| localStorage.removeItem("partialview");
|
| LoadPartialView(contenttypedatamasterid);
|
| }
|
|
|
| if (localStorage.getItem("partialviewFromInner") != null && localStorage.getItem("partialviewFromInner") != '') {
|
| var contenttypedatamasterid = localStorage.getItem("partialviewFromInner");
|
| localStorage.removeItem("partialviewFromInner");
|
| LoadPartialView(contenttypedatamasterid);
|
| }
|
|
|
| // Code Start by : Janak Thakkar 27-01-2020
|
| $('#anotherVersionSearch').hide();
|
| if (!$('#anotherVersionSearch').is(":hidden")) {
|
| fillAlternativeDocumentList();
|
| }
|
| // Code End by : Janak Thakkar 27-01-2020
|
|
|
| $('.form__date').datepicker("option", {
|
| "dateFormat": "dd/mm/yy",
|
| "changeMonth": true,
|
| "changeYear": true,
|
| "yearRange": "c-150:c+50"
|
| });
|
|
|
| $("#DocumentContentTypeId").val('13');
|
| $("#divFilterData").hide();
|
|
|
| //$('.auto_complete_ArbitrationRuleSearch').autocomplete({
|
| // source: function (request, response) {
|
| // $.ajax({
|
| // url: "/Admin/ContentTypeData/SelectMasterDropdownOptions",
|
| // type: "POST",
|
| // dataType: "json",
|
| // data: { documentContentTypeId: $("#DocumentContentTypeId").val(), keyword: request.term },
|
| // success: function (data) {
|
| // if (data.length != 0) {
|
| // response($.map(data, function (item) {
|
| // return { label: item.Text, value: item.Text };
|
| // }))
|
| // }
|
| // }
|
| // })
|
| // },
|
| // select: function (e, i) {
|
| // $('#hdnArbitrationRuleSearch').val(i.item.value);
|
| // $(this.element).val(i.item.Text);
|
| // loadDataTable('');
|
| // //e.preventDefault();
|
| // },
|
| // minLength : 0,
|
| // messages: {
|
| // noResults: "No results",
|
| // results: function (count) {
|
| // return count + (count == 0 ? 'result' : 'results');
|
| // }
|
| // }
|
| //}).focus(function () {
|
| // $(this).autocomplete("search");
|
| //});
|
|
|
| //auto complete serachable dropdown for "Issuing Organization"
|
| $("#AutoCompleteIssuingOrganization").autocomplete({
|
| source: function (request, response) {
|
| $.ajax({
|
| url: '/Admin/ContentTypeData/GetSearchableDrpValuesByMetaFieldName',
|
| type: "POST",
|
| dataType: "json",
|
| data: { DocumentContentTypeId: $("#DocumentContentTypeId").val(), prefix: request.term, metaFieldName: 'Issuing Organization' },
|
| success: function (data) {
|
| var dataSelect = $('#AutoCompleteIssuingOrganization').parents('.ui-autocomplete-multiselect').find('div');
|
| if (dataSelect.length > 0) {
|
| for (var i = 0; i < dataSelect.length; i++) {
|
| if (data.indexOf(dataSelect[i].textContent, 0)) {
|
| var textSelect = dataSelect[i].textContent;
|
| for (var j = data.length - 1; j >= 0; j--) {
|
| if (data[j].label.trim() === textSelect.trim()) {
|
| data.splice(j, 1);
|
| }
|
| }
|
| }
|
| }
|
| }
|
| if (data.length > 0) {
|
| response($.map(data, function (item) {
|
| return { label: item.label, value: item.label, selValue: item.value };
|
| }))
|
| }
|
| },
|
| error: function (response) {
|
| },
|
| failure: function (response) { }
|
| });
|
| },
|
| multiselect: true,
|
| appendTo: "#typeAuto",
|
| pageselect: function (e, item) {
|
| $("#AutoCompleteIssuingOrganization").focus();
|
| },
|
| minLength: 0
|
| }).focus(function () {
|
| $(this).autocomplete("search");
|
| });
|
|
|
| //auto complete serachable dropdown for "Status"
|
| $("#AutoCompleteStatus").autocomplete({
|
| source: function (request, response) {
|
| $.ajax({
|
| url: '/Admin/ContentTypeData/GetDocumentStatusMaster',
|
| type: "POST",
|
| dataType: "json",
|
| data: { prefix: request.term },
|
| success: function (data) {
|
| var dataSelect = $('#AutoCompleteStatus').parents('.ui-autocomplete-multiselect').find('div');
|
| if (dataSelect.length > 0) {
|
| for (var i = 0; i < dataSelect.length; i++) {
|
| if (data.indexOf(dataSelect[i].textContent, 0)) {
|
| var textSelect = dataSelect[i].textContent;
|
| for (var j = data.length - 1; j >= 0; j--) {
|
| if (data[j].label.trim() === textSelect.trim()) {
|
| data.splice(j, 1);
|
| }
|
| }
|
| }
|
| }
|
| }
|
| if (data.length > 0) {
|
| response($.map(data, function (item) {
|
| return { label: item.label, value: item.label, selValue: item.value };
|
| }))
|
| }
|
| },
|
| error: function (response) {
|
| },
|
| failure: function (response) { }
|
| });
|
| },
|
| multiselect: true,
|
| appendTo: "#typeAuto",
|
| pageselect: function (e, item) {
|
| $("#AutoCompleteStatus").focus();
|
| },
|
| minLength: 0
|
| }).focus(function () {
|
| $(this).autocomplete("search");
|
| });
|
|
|
| //auto complete serachable dropdown for "UpdatedBy"
|
| $("#AutoCompleteUpdatedBy").autocomplete({
|
| source: function (request, response) {
|
| $.ajax({
|
| url: '/Admin/ContentTypeData/GetDrpValuesForUpdatedBy',
|
| type: "POST",
|
| dataType: "json",
|
| data: { prefix: request.term },
|
| success: function (data) {
|
| //var dataSelect = $('.ui-autocomplete-multiselect').find('div');
|
| var dataSelect = $('#AutoCompleteUpdatedBy').parents('.ui-autocomplete-multiselect').find('div');
|
| if (dataSelect.length > 0) {
|
| for (var i = 0; i < dataSelect.length; i++) {
|
| if (data.indexOf(dataSelect[i].textContent, 0)) {
|
| var textSelect = dataSelect[i].textContent;
|
| for (var j = data.length - 1; j >= 0; j--) {
|
| if (data[j].label.trim() === textSelect.trim()) {
|
| data.splice(j, 1);
|
| }
|
| }
|
| }
|
| }
|
| }
|
| if (data.length > 0) {
|
| response($.map(data, function (item) {
|
| return { label: item.label, value: item.label, selValue: item.value };
|
| }))
|
| }
|
| },
|
| error: function (response) {
|
| },
|
| failure: function (response) { }
|
| });
|
| },
|
| multiselect: true,
|
| appendTo: "#typeAuto",
|
| pageselect: function (e, item) {
|
| $("#AutoCompleteUpdatedBy").focus();
|
| },
|
| minLength: 0
|
| }).focus(function () {
|
| $(this).autocomplete("search");
|
| });
|
|
|
| $("#hdnPartiestoTreatyId").val(localStorage.getItem("hdnIssuingOrganizationId"));
|
| $("#hdnPartiestoTreaty").val(localStorage.getItem("hdnIssuingOrganization"));
|
| $("#hdnActiveInactiveId").val(localStorage.getItem("hdnActiveInactiveId"));
|
| $("#hdnActiveInactive").val(localStorage.getItem("hdnActiveInactive"));
|
| $("#hdnStatusId").val(localStorage.getItem("hdnStatusId"));
|
| $("#hdnStatus").val(localStorage.getItem("hdnStatus"));
|
| $("#hdnUpdatedById").val(localStorage.getItem("hdnUpdatedById"));
|
| $("#hdnUpdatedBy").val(localStorage.getItem("hdnUpdatedBy"));
|
| $("#hdnDateFrom").val(localStorage.getItem("hdnDateFrom"));
|
| $("#hdnDateTo").val(localStorage.getItem("hdnDateTo"));
|
|
|
| if ((localStorage.getItem("hdnIssuingOrganizationId") != "" && localStorage.getItem("hdnIssuingOrganizationId") != null) ||
|
| (localStorage.getItem("hdnStatusId") != "" && localStorage.getItem("hdnStatusId") != null) ||
|
| (localStorage.getItem("hdnUpdatedById") != "" && localStorage.getItem("hdnUpdatedById") != null) ||
|
| (localStorage.getItem("hdnDateFrom") != "" && localStorage.getItem("hdnDateFrom") != null) ||
|
| (localStorage.getItem("hdnDateTo") != "" && localStorage.getItem("hdnDateTo") != null) ||
|
| (localStorage.getItem("hdnActiveInactiveId") != "" && localStorage.getItem("hdnActiveInactiveId") != null)) {
|
| openFilterData();
|
|
|
| if (localStorage.getItem("hdnActiveInactiveId") != "" && localStorage.getItem("hdnActiveInactiveId") != null) {
|
| $("#ActiveInactive").val(localStorage.getItem("hdnActiveInactiveId"));
|
| }
|
|
|
| if (localStorage.getItem("hdnDateFrom") != "" && localStorage.getItem("hdnDateFrom") != null) {
|
| $("#DateFrom").val(localStorage.getItem("hdnDateFrom"));
|
| }
|
|
|
| if (localStorage.getItem("hdnDateTo") != "" && localStorage.getItem("hdnDateTo") != null) {
|
| $("#DateTo").val(localStorage.getItem("hdnDateTo"));
|
| }
|
|
|
| var stringHtml = '';
|
|
|
| if (localStorage.getItem("hdnIssuingOrganizationId") != "" && localStorage.getItem("hdnIssuingOrganizationId") != null) {
|
| var lstIssuingOrganizationId = localStorage.getItem("hdnIssuingOrganizationId").split(",");
|
| var lstIssuingOrganization = localStorage.getItem("hdnIssuingOrganization").split(",");
|
| stringHtml = '';
|
|
|
| for (var i = 0; i < lstIssuingOrganizationId.length; i++) {
|
| stringHtml += '<div class="ui-autocomplete-multiselect-item" datavalue="' +
|
| lstIssuingOrganizationId[i] + '">' +
|
| lstIssuingOrganization[i] + '<span class="ui-icon ui-icon-close edit_ui-icon-close"></span></div>';
|
| }
|
|
|
| if (stringHtml != '') {
|
| $(stringHtml).insertBefore($('#AutoCompleteIssuingOrganization'));
|
| }
|
| }
|
|
|
| if (localStorage.getItem("hdnStatusId") != "" && localStorage.getItem("hdnStatusId") != null) {
|
| var lstStatusId = localStorage.getItem("hdnStatusId").split(",");
|
| var lstStatus = localStorage.getItem("hdnStatus").split(",");
|
| stringHtml = '';
|
|
|
| for (var i = 0; i < lstStatusId.length; i++) {
|
| stringHtml += '<div class="ui-autocomplete-multiselect-item" datavalue="' +
|
| lstStatusId[i] + '">' +
|
| lstStatus[i] + '<span class="ui-icon ui-icon-close edit_ui-icon-close"></span></div>';
|
| }
|
|
|
| if (stringHtml != '') {
|
| $(stringHtml).insertBefore($('#AutoCompleteStatus'));
|
| }
|
| }
|
|
|
| if (localStorage.getItem("hdnUpdatedById") != "" && localStorage.getItem("hdnUpdatedById") != null) {
|
| var lstUpdatedById = localStorage.getItem("hdnUpdatedById").split(",");
|
| var lstUpdatedBy = localStorage.getItem("hdnUpdatedBy").split(",");
|
| stringHtml = '';
|
|
|
| for (var i = 0; i < lstUpdatedById.length; i++) {
|
| stringHtml += '<div class="ui-autocomplete-multiselect-item" datavalue="' +
|
| lstUpdatedById[i] + '">' +
|
| lstUpdatedBy[i] + '<span class="ui-icon ui-icon-close edit_ui-icon-close"></span></div>';
|
| }
|
|
|
| if (stringHtml != '') {
|
| $(stringHtml).insertBefore($('#AutoCompleteUpdatedBy'));
|
| }
|
| }
|
| }
|
|
|
| $("#hdnArbitrationRuleSearch").val(localStorage.getItem("hdnArbitrationRuleSearch"));
|
| $("#ArbitrationRuleSearch").val(localStorage.getItem("hdnArbitrationRuleSearch"));
|
|
|
| loadDataTable($("#arbitrationRuleListForm"));
|
| });
|
|
|
| function setExportTypeExcel(item) {
|
| $("#hdnExportType").val(item);
|
| if ($('#tblArbitrationRule').DataTable().data().length > 0) {
|
| $("#arbitrationRuleListForm").submit();
|
| } else {
|
| setTimeout(function () {
|
| $.notify({ message: 'No records found to export excel.' }, { type: 'info', placement: { from: "top", align: "center" } });
|
| }, 50);
|
| }
|
| }
|
|
|
| function openFilterData() {
|
| if ($("#divFilterData").is(':hidden')) {
|
| $(".filterIcon").removeClass("fa fa-angle-down");
|
| $(".filterIcon").addClass("fa fa-angle-up");
|
| $("#divFilterData").show();
|
| } else {
|
| $(".filterIcon").removeClass("fa fa-angle-up");
|
| $(".filterIcon").addClass("fa fa-angle-down");
|
| $("#divFilterData").hide();
|
| }
|
| }
|
|
|
| function setDateError(element, errorMsg) {
|
| element.text(errorMsg);
|
| element.attr("style", "display:block");
|
| element.addClass('error');
|
| }
|
|
|
| function removeDateError(element) {
|
| element.text('');
|
| element.removeClass('error');
|
| }
|
|
|
| //this function for reset Search
|
| function resetSearch() {
|
| $("#hdnArbitrationRuleSearch").val("");
|
| $("#ArbitrationRuleSearch").val("");
|
| $("#displayStart").val(0);
|
| localStorage.removeItem("hdnArbitrationRuleSearch");
|
| loadDataTable($("#arbitrationRuleListForm"));
|
| }
|
|
|
| //this function for clear all Filter
|
| function clearDataFilter() {
|
| var dataSelect = $('.ui-autocomplete-multiselect').find('div');
|
| if (dataSelect.length > 0) {
|
| for (var i = 0; i < dataSelect.length; i++) {
|
| $(dataSelect)[i].remove();
|
| }
|
| }
|
|
|
| $("#displayStart").val(0);
|
| $("#hdnIssuingOrganizationId").val("");
|
| $("#hdnIssuingOrganization").val("");
|
| $("#AutoCompleteIssuingOrganization").parent(".ui-autocomplete-multiselect-item").remove();
|
| $("#hdnStatusId").val("");
|
| $("#hdnStatus").val("");
|
| $("#AutoCompleteStatus").parent(".ui-autocomplete-multiselect-item").remove();
|
| $("#hdnUpdatedById").val("");
|
| $("#hdnUpdatedBy").val("");
|
| $("#AutoCompleteUpdatedBy").parent(".ui-autocomplete-multiselect-item").remove();
|
| $("#hdnDateFrom").val("");
|
| $("#hdnDateTo").val("");
|
| $("#DateFrom").val("");
|
| $("#DateTo").val("");
|
| $("#hdnActiveInactiveId").val("");
|
| $("#hdnActiveInactive").val("");
|
| $("#ActiveInactive").val(0);
|
| $("#filtercount").text("");
|
|
|
| localStorage.removeItem("hdnIssuingOrganizationId");
|
| localStorage.removeItem("hdnIssuingOrganization");
|
| localStorage.removeItem("hdnStatusId");
|
| localStorage.removeItem("hdnStatus");
|
| localStorage.removeItem("hdnDateFrom");
|
| localStorage.removeItem("hdnDateTo");
|
| localStorage.removeItem("hdnUpdatedById");
|
| localStorage.removeItem("hdnUpdatedBy");
|
| localStorage.removeItem("hdnActiveInactiveId");
|
| localStorage.removeItem("hdnActiveInactive");
|
|
|
| removeDateError($("#dateFromError"));
|
| removeDateError($("#dateToError"));
|
| loadDataTable('');
|
| }
|
|
|
| //this function to Filter dispute list data
|
| function filterArbitrationRule(formElement) {
|
| var flag = false;
|
| var _filterCount = 0;
|
| $("#hdnDateFrom").val('');
|
| $("#hdnDateTo").val('');
|
| if (($('#DateFrom').val() !== '' && $('#DateTo').val() !== '')) {
|
| var startDate = $('#DateFrom').val();
|
| var endDate = $('#DateTo').val();
|
| var isValidStartDate = dateValidation(startDate);
|
| var isValidEndDate = dateValidation(endDate);
|
|
|
| if (isValidStartDate && isValidEndDate) {
|
| flag = true;
|
| removeDateError($("#dateFromError"));
|
| removeDateError($("#dateToError"));
|
| } else {
|
| flag = false;
|
| if (!isValidStartDate) {
|
| setDateError($("#dateFromError"), "Please enter valid date (eg.DD/MM/YYYY).");
|
| } else {
|
| removeDateError($("#dateFromError"));
|
| }
|
|
|
| if (!isValidEndDate) {
|
| setDateError($("#dateToError"), "Please enter valid date (eg.DD/MM/YYYY).");
|
| } else {
|
| removeDateError($("#dateToError"));
|
| }
|
| }
|
|
|
| if (flag) {
|
| var sDate = stringToParseDMY(startDate);
|
| var eDate = stringToParseDMY(endDate);
|
| if (sDate > eDate) {
|
| removeDateError($("#dateFromError"));
|
| setDateError($("#dateFromError"), "To date must be greater than from date.");
|
| flag = false;
|
|
|
| } else {
|
| _filterCount = _filterCount + 2;
|
| $("#hdnDateFrom").val(startDate);
|
| $("#hdnDateTo").val(endDate);
|
| removeDateError($("#dateFromError"));
|
| flag = true;
|
| }
|
| }
|
| } else if (($('#DateFrom').val() === '' && $('#DateTo').val() === '')) {
|
| removeDateError($("#dateFromError"));
|
| removeDateError($("#dateToError"));
|
| flag = true;
|
| } else if (($('#DateFrom').val() !== '' || $('#DateTo').val() !== '')) {
|
|
|
| var startDate = $('#DateFrom').val();
|
| var endDate = $('#DateTo').val();
|
| if (startDate != '') {
|
| $("#hdnDateFrom").val(startDate);
|
| var isValidStartDate = dateValidation(startDate);
|
| if (!isValidStartDate) {
|
| flag = false;
|
| setDateError($("#dateFromError"), "Please enter valid date (eg.DD/MM/YYYY).");
|
| } else {
|
| _filterCount = _filterCount + 1;
|
| flag = true;
|
| removeDateError($("#dateFromError"));
|
| }
|
| }
|
| if (endDate != '') {
|
| $("#hdnDateTo").val(endDate);
|
| var isValidEndDate = dateValidation(endDate);
|
| if (!isValidEndDate) {
|
| flag = false;
|
| setDateError($("#dateToError"), "Please enter valid date (eg.DD/MM/YYYY).");
|
| } else {
|
| _filterCount = _filterCount + 1;
|
| flag = true;
|
| removeDateError($("#dateToError"));
|
| }
|
| }
|
|
|
| if (startDate == '') {
|
| removeDateError($("#dateFromError"));
|
| } else if (endDate == '') {
|
| removeDateError($("#dateToError"));
|
| }
|
| }
|
|
|
| if (flag) {
|
| $("#displayStart").val(0);
|
| var issuingOrganizationText = '';
|
| var statusText = '';
|
| var updatedByText = '';
|
| var lstArray = [];
|
|
|
| dataSelect = $('#AutoCompleteIssuingOrganization').parent().find('div');
|
| if (dataSelect.length > 0) {
|
| for (var i = 0; i < dataSelect.length; i++) {
|
| lstArray.push($(dataSelect[i]).attr("datavalue"));
|
|
|
| if (i === 0) {
|
| issuingOrganizationText = $(dataSelect[i]).text();
|
| } else {
|
| issuingOrganizationText += ', ' + $(dataSelect[i]).text();
|
| }
|
| }
|
| }
|
|
|
| if (lstArray.length > 0) {
|
| $("#hdnIssuingOrganizationId").val(lstArray);
|
| $("#hdnIssuingOrganization").val(issuingOrganizationText);
|
| _filterCount = _filterCount + 1;
|
| } else {
|
| $("#hdnIssuingOrganizationId").val("");
|
| $("#hdnIssuingOrganization").val("");
|
| }
|
| lstArray = [];
|
|
|
| var dataSelect = $('#AutoCompleteStatus').parent().find('div');
|
| if (dataSelect.length > 0) {
|
| for (var i = 0; i < dataSelect.length; i++) {
|
| lstArray.push($(dataSelect[i]).attr("datavalue"));
|
|
|
| if (i === 0) {
|
| statusText = $(dataSelect[i]).text();
|
| } else {
|
| statusText += ', ' + $(dataSelect[i]).text();
|
| }
|
| }
|
| }
|
| if (lstArray.length > 0) {
|
| $("#hdnStatusId").val(lstArray);
|
| $("#hdnStatus").val(statusText);
|
| _filterCount = _filterCount + 1;
|
| } else {
|
| $("#hdnStatusId").val("");
|
| $("#hdnStatus").val("");
|
| }
|
| lstArray = [];
|
|
|
| dataSelect = $('#AutoCompleteUpdatedBy').parent().find('div');
|
| if (dataSelect.length > 0) {
|
| for (var i = 0; i < dataSelect.length; i++) {
|
| lstArray.push($(dataSelect[i]).attr("datavalue"));
|
|
|
| if (i === 0) {
|
| updatedByText = $(dataSelect[i]).text();
|
| } else {
|
| updatedByText += ', ' + $(dataSelect[i]).text();
|
| }
|
| }
|
| }
|
|
|
| if (lstArray.length > 0) {
|
| $("#hdnUpdatedById").val(lstArray);
|
| $("#hdnUpdatedBy").val(updatedByText);
|
| _filterCount = _filterCount + 1;
|
| } else {
|
| $("#hdnUpdatedById").val("");
|
| $("#hdnUpdatedBy").val("");
|
| }
|
| lstArray = [];
|
|
|
| if ($('#ActiveInactive').val() > 0) {
|
| $("#hdnActiveInactiveId").val($('#ActiveInactive').val());
|
| $("#hdnActiveInactive").val($("#ActiveInactive option:selected").text());
|
| _filterCount = _filterCount + 1;
|
| } else {
|
| $("#hdnActiveInactiveId").val("");
|
| $("#hdnActiveInactive").val("");
|
| }
|
|
|
| localStorage.setItem("hdnIssuingOrganizationId", $("#hdnIssuingOrganizationId").val());
|
| localStorage.setItem("hdnIssuingOrganization", $("#hdnIssuingOrganization").val());
|
| localStorage.setItem("hdnStatusId", $("#hdnStatusId").val());
|
| localStorage.setItem("hdnStatus", $("#hdnStatus").val());
|
| localStorage.setItem("hdnDateFrom", $("#hdnDateFrom").val());
|
| localStorage.setItem("hdnDateTo", $("#hdnDateTo").val());
|
| localStorage.setItem("hdnUpdatedById", $("#hdnUpdatedById").val());
|
| localStorage.setItem("hdnUpdatedBy", $("#hdnUpdatedBy").val());
|
| localStorage.setItem("hdnActiveInactiveId", $("#hdnActiveInactiveId").val());
|
| localStorage.setItem("hdnActiveInactive", $("#hdnActiveInactive").val());
|
|
|
| if (_filterCount > 0) {
|
| $("#filtercount").text("(" + _filterCount + ")");
|
| } else {
|
| $("#filtercount").text("");
|
| }
|
|
|
| loadDataTable(formElement);
|
| }
|
| }
|
|
|
| // JS Code Start Changes by JT : 27-01-2020
|
| function fillAlternativeDocumentList() {
|
| $('#AnotherVersionDocumentList').autocomplete({
|
| source: function (request, response) {
|
| if (request.term == "on") {
|
| request.term = "";
|
| }
|
| $.ajax({
|
| url: "/Admin/ContentTypeData/GetAnotherVersionDocument",
|
| type: "POST",
|
| dataType: "json",
|
| data: { treatyTypeListId: 0, documentContentTypeId: $('#DocumentContentTypeId').val(), prefix: request.term.trim(), moduleName: "AR" },
|
| success: function (data) {
|
| if (data.length == 0) {
|
| var result = [{ label: 'No records found.' }];
|
| response(result);
|
| return false;
|
| }
|
| else {
|
| response($.map(data, function (item) {
|
| return { label: item.label, value: item.label, selectValue: item.value, ContentTypeDataMasterId: item.ContentTypeDataMasterId };
|
| }));
|
| }
|
|
|
| }
|
| })
|
| },
|
| appendTo: ".divanotherVersionSearch",
|
| select: function (e, i) {
|
| $("#AnotherVersionDocumentList").attr('data-documentid', i.item.selectValue);
|
| $("#AnotherVersionDocumentList").attr('data-ContentTypeDataMasterId', i.item.ContentTypeDataMasterId);
|
|
|
| },
|
| change: function (event, ui) {
|
| if (ui.item === null) {
|
| $('#AnotherVersionDocumentList').val("");
|
| $('#AnotherVersionDocumentList').removeAttr("data-documentid");
|
| $("#AnotherVersionDocumentList").removeAttr('data-ContentTypeDataMasterId');
|
| }
|
| else {
|
| $('.AnotherDocumentError').text("");
|
| $('.AnotherDocumentError').removeClass("error");
|
| }
|
| },
|
| messages: {
|
| noResults: "No results",
|
| results: function (count) {
|
| return count + (count === 0 ? 'result' : 'results');
|
| }
|
| },
|
| minLength: 0
|
| }).focus(function () {
|
| $(this).autocomplete("search");
|
| });
|
| }
|
|
|
| $('#IsAlternativeVersion ,.treatytype').change(function (e) {
|
| if ($("#IsAlternativeVersion").is(":checked")) {
|
| $('#anotherVersionSearch').show();
|
| fillAlternativeDocumentList();
|
| }
|
| else {
|
| $("#AnotherVersionDocumentList").val("");
|
| $('#anotherVersionSearch').hide();
|
| $('#AnotherVersionDocumentList').removeAttr('data-documentid');
|
| $('#AnotherVersionDocumentList').removeAttr('data-contenttypedatamasterid');
|
| $(".AnotherDocumentError").hide();
|
| }
|
| });
|
|
|
| // By Janak Thakkar : (To load partial view)
|
| function LoadPartialView(id) {
|
| var contentTypeDataMasterId = id;
|
| var _data = "";
|
| var _url = "/Admin/ContentTypeData/CreateArbitrationRule";
|
| if (contentTypeDataMasterId !== undefined && contentTypeDataMasterId > 0) {
|
| _data = "contentTypeDataMasterId=" + contentTypeDataMasterId;
|
| }
|
| $.ajax({
|
| url: _url,
|
| data: _data,
|
| type: "GET",
|
| beforeSend: function () {
|
| ProgressBar.show($("body"));
|
| },
|
| failure: function (data) { ProgressBar.hide($("body")); },
|
| success: function (data) {
|
|
|
| $("#page-content").html(data);
|
| $('html, body').scrollTop(0);
|
| ProgressBar.hide($("body"));
|
| },
|
| error: function (passParams) {
|
| ProgressBar.hide($("body"));
|
| }
|
| });
|
| }
|
|
|
| $("#arbitrationRuleListForm").delegate(".openpartial", "click", function () {
|
| var contentTypeDataMasterId = $(this).attr("data-id");
|
| localStorage.setItem("partialview", contentTypeDataMasterId);
|
| window.open("/Admin/ContentTypeData/ArbitrationRuleList", '_blank');
|
| });
|
|
|
| // JS Code Changes End by JT : 27-01-2020
|
|
|
| $(document).on("keypress keyup keydown", ".UINValidation", function (event) {
|
| var readOnlyLength = 0; //4;
|
| if ((event.which != 37 && (event.which != 39)) && ((this.selectionStart < readOnlyLength) || ((this.selectionStart == readOnlyLength) && (event.which == 8)))) {
|
| return false;
|
| }
|
| });
|
|
|
| //$(document).delegate("#ArbitrationRuleSearch", "keyup", function (e) {
|
| // var disablekey = [37, 38, 39, 40];
|
| // if (!disablekey.includes(e.keyCode)) {
|
| // if ($("#ArbitrationRuleSearch").val() != "" && e.keyCode === 13) {
|
| // loadDataTable($("#hdnArbitrationRuleSearch").val($(this).val()));
|
| // }
|
| // else {
|
| // $("#hdnArbitrationRuleSearch").val('');
|
| // loadDataTable('');
|
| // }
|
| // }
|
| //});
|
|
|
| function isNumeric(value) {
|
| return /^-{0,1}\d+$/.test(value);
|
| }
|
|
|
| function validationform(isuploadskip) {
|
| var isvalid = true;
|
| if (isuploadskip) {
|
| $('input[type=text][isRequired="true"]').not('#txtfilename').each(function () {
|
| if ($(this).val().trim() == '') {
|
| if (isvalid) {
|
| isvalid = false;
|
| }
|
| $(this).siblings('.errorText').text($(this).attr('validationtext')).addClass('error');
|
| $(this).val('');
|
| }
|
| });
|
| } else {
|
| $('input[type=text][isRequired="true"]').each(function () {
|
| if ($(this).val().trim() == '') {
|
| if (isvalid) {
|
| isvalid = false;
|
| }
|
| $(this).siblings('.errorText').text($(this).attr('validationtext')).addClass('error');
|
| $(this).val('');
|
| }
|
| });
|
| }
|
|
|
| $('input[type=text][isRequired="true"].searchabledropdown').each(function () {
|
| if ($(this).val().trim() == '') {
|
| if (isvalid) {
|
| isvalid = false;
|
| }
|
| $(this).parent().siblings('.errorText').text($(this).attr('validationtext')).addClass('error');
|
| $(this).val('');
|
| }
|
| });
|
|
|
| $('select[isRequired="true"]').each(function () {
|
| if ($(this).prop('selectedIndex') <= 0) {
|
| if (isvalid) {
|
| isvalid = false;
|
| }
|
| $(this).parent().siblings('.errorText').text($(this).attr('validationtext')).addClass('error');
|
| }
|
| });
|
|
|
| var returnvalue=checkuinvalidation();if(isvalid){isvalid=returnvalue;}
|
| return isvalid;
|
| }
|
|
|
| function checkuinvalidation() {
|
| var checkUINDuplicateflag = 0;
|
| var cntUINTextCtrl = $('.UINValidation').length;
|
| if (cntUINTextCtrl > 0) {
|
| var uinValue = $('.UINValidation').val();
|
| var metafieldId = $('.UINValidation').attr("metaFieldId");
|
|
|
| if (checkUINDuplicateflag === 0) {
|
| if (uinValue.length !== 8) {
|
| checkUINDuplicateflag++;
|
| $('.UINValidation').parent().find(".errorText").addClass('error');
|
| $('.UINValidation').parent().find('.errorText').text('Please enter valid UIN.');
|
| } else {
|
| var firstVal = isNumeric(uinValue.substr(4, 8));
|
| if (uinValue.charAt('3') === "/" && firstVal === true) {
|
| if (checkUINDuplicateflag > 0) {
|
| checkUINDuplicateflag--;
|
| }
|
| $('.UINValidation').parent().find('.errorText').removeClass('error');
|
| $('.UINValidation').parent().find('.errorText').text('');
|
| $.ajax({
|
| url: '/Admin/ContentTypeData/CheckUINDuplicate',
|
| type: "POST",
|
| dataType: "json",
|
| async: false,
|
| data: {
|
| UINValue: uinValue, metaFieldId: metafieldId, documentContentTypeId: '13', contentTypeDataMasterId: '0'
|
| },
|
| success: function (data) {
|
| if (data) {
|
| checkUINDuplicateflag++;
|
| $('.UINValidation').parent().find(".errorText").addClass("error");
|
| $('.UINValidation').parent().find(".errorText").text("The uin you have entered is already exists.");
|
| } else {
|
| if (checkUINDuplicateflag > 0) {
|
| checkUINDuplicateflag--;
|
| }
|
| $('.UINValidation').parent().find(".errorText").removeClass("error");
|
| $('.UINValidation').parent().find(".errorText").text("");
|
| }
|
| }
|
| })
|
| }
|
| else {
|
| checkUINDuplicateflag++;
|
| $('.UINValidation').parent().find(".errorText").addClass('error');
|
| $('.UINValidation').parent().find('.errorText').text('Please enter valid UIN.');
|
| }
|
| }
|
| }
|
| }
|
| if (checkUINDuplicateflag > 0) {
|
| return false;
|
| }
|
| else {
|
| return true;
|
| }
|
| }
|
|
|
| function loaddocumentreadyfields() {
|
| $('input[type=text][isRequired="true"]').each(function () {
|
| $(this).on('change', function () {
|
| if ($(this).val().trim() == '') {
|
| $(this).siblings('.errorText').text($(this).attr('validationtext')).addClass('error');
|
| $(this).val('');
|
| }
|
| else {
|
| $(this).siblings('.errorText').text('');
|
| }
|
| });
|
| });
|
|
|
| $('select[isRequired="true"]').each(function () {
|
| $(this).on('change', function () {
|
| if ($(this).prop('selectedIndex') <= 0) {
|
| $(this).parent().siblings('.errorText').text($(this).attr('validationtext')).addClass('error');
|
| } else {
|
| (this).parent().siblings('.errorText').text('');
|
| }
|
| });
|
|
|
| });
|
|
|
| setUINNopageload(); }
|
|
|
| function setUINNopageload() {
|
| $('.UINValidation').attr('autocomplete', false);
|
| if ($('.UINValidation').length > 0) {
|
| $.ajax({
|
| url: '/Admin/ContentTypeData/GetLastGeneratedUINNumber/',
|
| type: "POST",
|
| dataType: "json",
|
| data: {
|
| documentContentTypeId: 13 , uniCode: 'ARB/', masterName: 'ArbitrationRules'
|
| },
|
| success: function (data) {
|
| $('.UINValidation').val("ARB/" + data);
|
| }
|
| });
|
| }
|
| }
|
|
|
| function SkipUploadProcess() {
|
| setUINNopageload();
|
| }
|
|
|
| //$(document).delegate("#ArbitrationRuleSearch", "change", function (e) {
|
| // if ($("#ArbitrationRuleSearch").val() != "") {
|
| // loadDataTable($("#hdnArbitrationRuleSearch").val());
|
| // }
|
| // else {
|
| // $("#hdnArbitrationRuleSearch").val('');
|
| // loadDataTable('');
|
| // }
|
| //});
|
|
|
| function loadDataTable(formElement) {
|
| var issuingOrganizationSearch = null, status = null, updatedBy = null, dateFrom = null, dateTo = null, activeInactive = null;
|
|
|
| var documentContentTypeId = $("#DocumentContentTypeId").val();
|
| var arbitrationRuleSearch = $("#hdnArbitrationRuleSearch").val();
|
|
|
| if (formElement.length != 0) {
|
| issuingOrganizationSearch = $("#hdnIssuingOrganizationId").val();
|
| status = $("#hdnStatusId").val();
|
| updatedBy = $("#hdnUpdatedById").val();
|
| dateFrom = $("#hdnDateFrom").val();
|
| dateTo = $("#hdnDateTo").val();
|
| activeInactive = $("#hdnActiveInactiveId").val();
|
| }
|
|
|
| var displayStart = parseInt($("#displayStart").val());
|
|
|
| $("#tblArbitrationRule").DataTable().state.clear();
|
| $("#tblArbitrationRule").DataTable().destroy();
|
| var dataTable = $("#tblArbitrationRule").DataTable({
|
| "processing": false, // for show progress bar
|
| "serverSide": true, // for process server side
|
| "filter": false, // this is for disable filter (search box)
|
| "orderMulti": false, // for disable multiple column at once
|
| "responsive": true,
|
| "stateSave": true,
|
| "displayStart": displayStart,
|
| "initComplete": function (e, settings, json, xhr) {
|
| ProgressBar.hide($("body"));
|
| },
|
| "drawCallback": function (settings) {
|
| DatatableFixed();
|
| ProgressBar.hide($("body"));
|
| },
|
| "ajax": {
|
| "url": "/Admin/ContentTypeData/GetArbitrationRuleData/",
|
| "data": { "DocumentContentTypeId": documentContentTypeId, "ArbitrationRuleSearch": arbitrationRuleSearch, "IssuingOrganizationSearch": issuingOrganizationSearch, "Status": status, "UpdatedBy": updatedBy, "DateFrom": dateFrom, "DateTo": dateTo, "ActiveInactive": activeInactive },
|
| "type": "POST",
|
| "datatype": "json",
|
| "beforeSend": function () {
|
| ProgressBar.show($("body"));
|
| },
|
| "failure": function (data) { ProgressBar.hide($("body")); },
|
| "error": function (errordata) {
|
| ProgressBar.hide($("body"));
|
| },
|
| "async": true
|
| },
|
| "columnDefs": [
|
| { "targets": [0], "visible": false, "searchable": false },
|
| { "targets": [1], "searchable": false, "sortable": false, "class": "table__fixed table__checbox" },
|
| { "targets": [2], "class": "table__fixed" },
|
| { "targets": [10], "class": "table__fixed--right" }
|
| ],
|
| "columns": [
|
| { "data": "ContentTypeDataMasterId", "name": "ContentTypeDataMasterId" },
|
| {
|
| "name": "",
|
| "render": function (data, type, full, meta) {
|
| var displayDisable = "";
|
| var dynamicId = "AllMasterStatusCheckId_" + full.ContentTypeDataMasterId;
|
| return '<input type="checkbox" id=' + dynamicId + ' name="AllMasterStatusCheckId" class="form__checkbox chkMasterCheckbox checkBoxIndexCss" '
|
| + displayDisable + ' data-val="' + full.ContentTypeDataMasterId + '" />';
|
| }
|
| },
|
|
|
| {
|
| "name": "UIN",
|
| "render": function (data, type, full, meta) {
|
| // if ("True" == "False") {
|
| // return full.ArbitrationRuleName.replace(/\_/g, '').replace(/\$/g, ', ');
|
| // } else {
|
| return '<a data-id="' + full.ContentTypeDataMasterId + '" class="addEditContentTypeData cursor--pointer">' + full.UIN.replace(/\_/g, '').replace(/\$/g, ', '); + '</a>';
|
| // }
|
| }
|
| },
|
| { "data": "ArbitrationRuleName", "name": "ArbitrationRuleName" },
|
| { "data": "Languages", "name": "Languages" },
|
| { "data": "Status", "name": "Status" },
|
| { "data": "ActiveInactive", "name": "ActiveInactive" },
|
| { "data": "LastUpdated", "name": "LastUpdated" },
|
| { "data": "LastUpdatedBy", "name": "LastUpdatedBy" },
|
| {
|
| "name": "AlternatColumn",
|
| "render": function (data, type, full, meta) {
|
| //html = $.parseHTML(full.AlternatColumn);
|
| var isEncHTML = function (str) {
|
| if (str === null) {
|
| str = "";
|
| }
|
| if (str.search(/&/g) != -1 || str.search(/</g) != -1 || str.search(/>/g) != -1)
|
| return true;
|
| else
|
| return false;
|
| };
|
| var decHTMLifEnc = function (str) {
|
| if (isEncHTML(str))
|
| return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>');
|
| return str;
|
| }
|
| return decHTMLifEnc(full.AlternatColumn);
|
| },
|
| "sortable": false
|
| },
|
| {
|
| "render": function (data, type, full, meta) {
|
| return '<div class="dropdown dropdown--overlay">' +
|
| '<button id="table-dropdown-' + full.RowNum + '-control" class="button button--dropdown dropdown__toggle islgrebuildfilterbutton"' +
|
| 'type="button" data-attach-icon-after="fal fa-angle-down" aria-expanded="false" aria-controls="table-dropdown-' + full.RowNum + '">' +
|
| '<span class="no-break">Actions<i class="fal fa-angle-down" aria-hidden="true"></i></span></button > <div id="table-dropdown-' + full.RowNum + '" class="dropdown__content dropdown__content--accordion-right" aria-expanded="false"' +
|
| 'aria-labelledby="table-dropdown-' + full.RowNum + '-control"> ' +
|
| '<ul class="dropdown__list">' +
|
| '<li><a data-id="' + full.ContentTypeDataMasterId + '" data-attach-icon-after="fal" class="addEditContentTypeData cursor--pointer">View<i class="fal fa-angle-right" aria-hidden="true"></i></li>' +
|
| '<li><a data-id="' + full.ContentTypeDataMasterId + '" data-attach-icon-after="fal" class="addEditContentTypeData cursor--pointer">Edit<i class="fal fa-angle-right" aria-hidden="true"></i></li>' +
|
| '<li><a data-attach-icon-after="fal fa-angle-right" statusId="' + full.StatusIds + '" data-id="' + full.ContentTypeDataMasterId + '" class="check__dropdown__list-delete"><span class="no-break cursor--pointer">Delete<i class="fal fa-angle-right" aria-hidden="true"></i></span></a></li>' +
|
| '<li><a data-uin="' + full.UIN + '" data-val="' + full.ContentTypeDataMasterId + '" data-attach-icon-after="fal" class="changemasterstatus cursor--pointer">Change Status<i class="fal fa-angle-right" aria-hidden="true"></i></li>' +
|
| '</ul>' +
|
| '<div class="dropdown__delete-message">' +
|
| '<p>Deleting this record will also delete all associated data.<br><strong>Are you sure you want to delete this record ?</strong></p>' +
|
| '<button type="button" class="button button--neutral dropdown__cancel">Cancel</button>' +
|
| '<button type="button" data-id=' + full.ContentTypeDataMasterId + ' class="button button--primary btnDelete">Yes</button>' +
|
| '</div>' +
|
| '</div ></div > ';
|
| },
|
| "sortable": false
|
| }
|
| ]
|
| });
|
|
|
| }
|
|
|
| $('#arbitrationRuleListForm').on('draw.dt', function () {
|
| var table = $('#tblArbitrationRule').DataTable();
|
| var info = table.page.info(); // Get table page info
|
| var order = table.order();
|
| var sortOrder = (order[0][1]);
|
| var searchValue = $('input[type=search]').val();
|
| $("#hdnPageNumber").val(info.page + 1);
|
| $("#hdnSortOrder").val(sortOrder);
|
| $("#hdnSearch").val(searchValue);
|
| });
|
|
|
| $('.headersort thead th').click(function (e) {
|
| $('.headersort thead th').removeClass('headerGreen');
|
| $(this).addClass("headerGreen");
|
| });
|
|
|
| //added by Anil Mori on 21/11/2019 for check ContentTypeData References
|
| $(document).on('click', '.check__dropdown__list-delete', function (e) {
|
| e.preventDefault();
|
| var currentElement = $(this);
|
| var contentTypeDataMasterId = currentElement.attr('data-id');
|
| var statusId = currentElement.attr('statusId');
|
| if (statusId == '1') {
|
| $.notify({ message: 'You can not delete the record while document conversion in progress' },{ type: 'warning', timer: 0, placement: { from: "top", align: "center" } });
|
| } else {
|
| $.ajax({
|
| url: '/Admin/ContentTypeData/CheckContentTypeDataReferences',
|
| data: { "ContentTypeDataMasterId": contentTypeDataMasterId },
|
| type: "GET",
|
| beforeSend: function () { },
|
| failure: function (data) { },
|
| //async: false,
|
| success: function (data) {
|
| if (data > 0) {
|
| $('.islgrebuildfilterbutton').click();
|
| $.notify({ message: data + ' references are associated with this. You can not delete this entry.<br><a class="cursor--pointer" data-id="' + contentTypeDataMasterId + '" id="viewReferences">View References</a>' }, { type: 'warning', timer: 0, placement: { from: "top", align: "center" } });
|
| } else {
|
| currentElement.removeClass('check__dropdown__list-delete');
|
| currentElement.addClass('dropdown__list-delete');
|
| currentElement.click();
|
| }
|
| },
|
| error: function (passParams) { }
|
| });
|
| }
|
| });
|
|
|
| $(document).on('click', '#viewReferences', function (e) {
|
| $('button.close').click();
|
| var contentTypeDataMasterId = $(this).attr("data-id");
|
| var _data = "";
|
| var _url = "/Admin/ContentTypeData/CreateArbitrationRule";
|
| if (contentTypeDataMasterId !== undefined && contentTypeDataMasterId > 0) {
|
| _data = "contentTypeDataMasterId=" + contentTypeDataMasterId;
|
| }
|
| $.ajax({
|
| url: _url,
|
| data: _data,
|
| type: "GET",
|
| beforeSend: function () {
|
| ProgressBar.show($("body"));
|
| },
|
| failure: function (data) { ProgressBar.hide($("body")); },
|
| //async: false,
|
| success: function (data) {
|
| $("#page-content").html(data);
|
| $('html, body').scrollTop(0);
|
| $('#TaskListId').val("-1");
|
| ProgressBar.hide($("body"));
|
| },
|
| error: function (passParams) {
|
| ProgressBar.hide($("body"));
|
| }
|
| });
|
| });
|
|
|
| $("#arbitrationRuleListForm").delegate(".addEditContentTypeData", "click", function () {
|
| var contentTypeDataMasterId = $(this).attr("data-id");
|
| var _data = "";
|
| var _url = "/Admin/ContentTypeData/CreateArbitrationRule";
|
| if (contentTypeDataMasterId !== undefined && contentTypeDataMasterId > 0) {
|
| _data = { "contentTypeDataMasterId": contentTypeDataMasterId, "PageNo": $("#hdnPageNumber").val() };
|
| }
|
|
|
| var isView = false;
|
| if ($(this).text() == 'View') {
|
| isView = true;
|
| }
|
|
|
| $.ajax({
|
| url: _url,
|
| data: _data,
|
| type: "GET",
|
| beforeSend: function () {
|
| ProgressBar.show($("body"));
|
| },
|
| failure: function (data) { ProgressBar.hide($("body")); },
|
| //async: false,
|
| success: function (data) {
|
|
|
| $("#page-content").html(data);
|
| $('html, body').scrollTop(0);
|
| if (isView) {
|
| setTimeout(function () {
|
| $("#tab-2").click();
|
| }, 1);
|
| }
|
| isView = false;
|
| ProgressBar.hide($("body"));
|
| },
|
| error: function (passParams) {
|
| ProgressBar.hide($("body"));
|
| }
|
| });
|
| });
|
|
|
| $("#arbitrationRuleListForm").delegate(".btnDelete", "click", function (e) {
|
| var contentTypeDataMasterId = $(this).attr('data-id');
|
| $.ajax({
|
| type: "POST",
|
| url: "/Admin/ContentTypeData/Delete",
|
| data: { contentTypeDataMasterId: contentTypeDataMasterId },
|
| success: function (result) {
|
| location.href = "/Admin/ContentTypeData/ArbitrationRuleList";
|
| },
|
| error: function (result) {
|
| }
|
| });
|
| });
|
|
|
| function successmethod(contenttypedatamasterid) {
|
| var contentTypeDataMasterId = contenttypedatamasterid;
|
| var _data = "";
|
| var _url = "/Admin/ContentTypeData/CreateArbitrationRule";
|
| if (contentTypeDataMasterId !== undefined && contentTypeDataMasterId > 0) {
|
| _data = "contentTypeDataMasterId=" + contentTypeDataMasterId;
|
| }
|
| $.ajax({
|
| url: _url,
|
| data: _data,
|
| type: "GET",
|
| async: false,
|
| success: function (data) {
|
| $("#page-content").html(data);
|
| $('html, body').scrollTop(0);
|
| },
|
| error: function (passParams) {
|
| }
|
| });
|
| }
|
|
|
| function reloadfunction() {
|
| window.location.reload();
|
| }
|
|
|
| $(document).on("keyup", ".UINValidation", function (e) {
|
| var value = $(this).val();
|
| if (value.length !== 8) {
|
| $(this).parent().find(".errorText").addClass('error');
|
| $(this).parent().find('.errorText').text('Please enter valid UIN.');
|
| } else {
|
|
|
| var firstVal = isNumeric(value.substr(4, 8));
|
| if (value.charAt('3') === "/" && firstVal === true) {
|
| $(this).parent().find('.errorText').removeClass('error');
|
| $(this).parent().find('.errorText').text('');
|
| }
|
| else {
|
| $(this).parent().find(".errorText").addClass('error');
|
| $(this).parent().find('.errorText').text('Please enter valid UIN.');
|
| }
|
| }
|
| });
|
|
|
| $('#ArbitrationRuleSearch').keypress(function (e) {
|
| if (e.which == 13) {//Enter key pressed
|
| searchList();
|
| }
|
| });
|
|
|
| $('.searchicon').click(function (e) {
|
| searchList();
|
| })
|
|
|
| function searchList() {
|
| ProgressBar.show($("body"));
|
| $("#displayStart").val(0);
|
| if ($('#ArbitrationRuleSearch').val().length > 0) {
|
| var text = $('#ArbitrationRuleSearch').val().trim();
|
| $("#hdnArbitrationRuleSearch").val(text);
|
| localStorage.setItem("hdnArbitrationRuleSearch", text);
|
| loadDataTable($("#arbitrationRuleListForm"));
|
| }
|
| else {
|
| $("#hdnArbitrationRuleSearch").val('');
|
| localStorage.removeItem("hdnArbitrationRuleSearch");
|
| loadDataTable($("#arbitrationRuleListForm"));
|
| }
|
| }
|
|
|
| //// Example usage:
|
| //var searchdelay = setTimeout(function () { }, 10);
|
| //$('#ArbitrationRuleSearch').keyup(function (e) {
|
| // window.clearTimeout(searchdelay);
|
| // var text = $(this);
|
| // searchdelay = setTimeout(function () {
|
| // if (text.val().length > 2) {
|
| // ProgressBar.show($("body"));
|
| // $("#hdnArbitrationRuleSearch").val(text.val())
|
| // loadDataTable('');
|
| // } else {
|
| // if (text.val() == '') {
|
| // ProgressBar.show($("body"));
|
| // $("#hdnArbitrationRuleSearch").val('');
|
| // loadDataTable('');
|
| // }
|
| // }
|
| // }, 500);
|
| //});
|
|
|
| function EditMasterData(contentTypeDataMasterId) {
|
| $.ajax({
|
| url: "/Admin/ContentTypeData/CreateArbitrationRule",
|
| data: { "contentTypeDataMasterId": contentTypeDataMasterId, "PageNo": $("#hdnPageNumber").val() },
|
| type: "GET",
|
| beforeSend: function () {
|
| ProgressBar.show($("body"));
|
| },
|
| failure: function (data) { ProgressBar.hide($("body")); },
|
| //async: false,
|
| success: function (data) {
|
| $("#page-content").html(data);
|
| $('html, body').scrollTop(0);
|
| ProgressBar.hide($("body"));
|
| },
|
| error: function (passParams) {
|
| ProgressBar.hide($("body"));
|
| }
|
| });
|
| }
|
|
|
| $(document).on("click", ".edit_ui-icon-close", function (e) {
|
| var item = $(this).parent();
|
| item.remove();
|
| });
|
|
|
| // Code added by Janak Thakkar 02-09-2020 for Story 16800
|
|
|
| var dataArrayOfGroup = "";
|
|
|
| function statusPopupOpen() {
|
| document.getElementById("popupMasterBulkAction").style.display = "block";
|
| document.getElementById("overlayPopupMasterBulkAction").style.display = "block";
|
| $('.header').hide();
|
| }
|
|
|
| function statusPopupClose() {
|
| document.getElementById("popupMasterBulkAction").style.display = "none";
|
| document.getElementById("overlayPopupMasterBulkAction").style.display = "none";
|
| $('.table__clone .chkMasterCheckbox').prop('checked', false);
|
| $('.header').show();
|
| $('#BulkActionMaster').val("0");
|
| $("#BulkActionStatusPopup").val("0");
|
| $('#BulkActionMaster').attr('disabled', true);
|
| $("#errorStatus").hide();
|
| dataArrayOfGroup = "";
|
| }
|
|
|
| $(document).delegate(".pagination > li", "click", function (e) {
|
| setTimeout(function () {
|
| if (dataArrayOfGroup !== "") {
|
| $('.table__clone .chkMasterCheckbox').each(function (index, element) {
|
| if ((',' + dataArrayOfGroup + ',').includes(',' + $(element).attr('data-val') + ',')) {
|
| $(this).attr('checked', true);
|
| }
|
| else {
|
| $(this).attr('checked', false);
|
| }
|
| });
|
| }
|
| }, 100);
|
| });
|
|
|
| $(document).delegate("#BulkActionStatusPopup", "change", function (e) {
|
| if ($(this).val() != "0") {
|
| $("#errorStatus").hide();
|
| }
|
| });
|
|
|
| $(document).delegate(".chkMasterCheckbox", "click", function () {
|
| if ($(this).is(":checked")) {
|
| if (dataArrayOfGroup == "") {
|
| dataArrayOfGroup = $(this).attr('data-val');
|
| } else {
|
| dataArrayOfGroup = dataArrayOfGroup + "," + $(this).attr('data-val');
|
| }
|
| }
|
| else {
|
| var currentValue = $(this).attr('data-val');
|
| if (dataArrayOfGroup === $(this).attr('data-val')) {
|
| currentValue = $(this).attr('data-val');
|
| } else {
|
| currentValue = $(this).attr('data-val') + ",";
|
| }
|
| dataArrayOfGroup = dataArrayOfGroup.replace(currentValue, "");
|
| }
|
| if (dataArrayOfGroup != "") {
|
| $('#BulkActionMaster').attr('disabled', false);
|
| } else {
|
| $('#BulkActionMaster').attr('disabled', true);
|
| }
|
| });
|
|
|
| $('#BulkActionMaster').change(function (e) {
|
| if (dataArrayOfGroup == "") {
|
| $('#BulkActionMaster').val("0");
|
| setTimeout(function () {
|
| $.notify({ message: 'Please select atleast one checkbox for bulk action.' }, { type: 'warning', placement: { from: "top", align: "center" } });
|
| }, 10);
|
| } else {
|
| $("#AddMasterBulkActions").click();
|
| $("#dynamicGroupStatus").text("multiple entry");
|
| }
|
| });
|
|
|
| $(document).delegate(".changemasterstatus", "click", function () {
|
| dataArrayOfGroup = $(this).attr('data-val');
|
| statusPopupOpen();
|
| $("#dynamicGroupStatus").text("UIN : " + $(this).attr("data-uin"));
|
| });
|
|
|
| function btnSaveBulkMasterPopupData(e) {
|
| if ($("#BulkActionStatusPopup").val() == "0") {
|
| $("#errorStatus").show();
|
| }
|
| else {
|
| $.ajax({
|
| url: "/Admin/ContentTypeData/UpdateBulkStatusMasterData",
|
| type: "POST",
|
| dataType: "json",
|
| data: {
|
| StatusId: $("#BulkActionStatusPopup").val(),
|
| ContentTypeList: dataArrayOfGroup
|
| },
|
| success: function (data) {
|
| if (data === true) {
|
| statusPopupClose();
|
| setTimeout(function () {
|
| $.notify({ message: 'Status has been changed successfully.' }, { type: 'info', placement: { from: "top", align: "center" } });
|
| loadDataTable($("#arbitrationRuleListForm"));
|
| $('#AddMasterBulkActions').val("0");
|
| dataArrayOfGroup = "";
|
| }, 100);
|
| }
|
| }
|
| })
|
| }
|
| }
|
| </script>
|
|
|
| </div>
|
|
|
|
|
|
|
|
|
|
|
|
|
| <script src="/js/Admin/jquery-ui.min-1.12.1.js"></script>
|
| <script src="/js/Admin/moment.min.js"></script>
|
| <script src="/js/Admin/daterangepicker.min.js"></script>
|
|
|
| <script src="/assets/scripts/min/sassquatch.min.js"></script>
|
|
|
| <script src="/assets/scripts/tagging.js"></script>
|
|
|
|
|
| <script src="/js/Admin/jquery.dataTables.min-1.10.19.js"></script>
|
|
|
|
|
| <script src="/js/Admin/dataTables.bootstrap4.min-1.10.19.js"></script>
|
|
|
| <script src="/js/bootstrap-notify.js"></script>
|
| <script src="/js/jquery.autocomplete.multiselect.js"></script>
|
|
|
|
|
| <link href="/css/datatable1.css" rel="stylesheet" />
|
| <link href="/css/datatable2.css" rel="stylesheet" />
|
|
|
| <script src="/js/Admin/delete.js"></script>
|
| <script src="/js/Admin/UserDefineScripts/DocumentUpload.js"></script>
|
| <script src="/js/Admin/UserDefineScripts/CommonFunction.js"></script>
|
|
|
|
|
|
|
|
|
| <script src="/tinymce/js/tinymce/jquery.tinymce.min.js"></script>
|
| <script src="/tinymce/js/tinymce/tinymce.min.js"></script>
|
| <script src="/tinymce/js/tinymce/plugins/advlist/plugin.min.js"></script>
|
| <script src="/tinymce/js/tinymce/plugins/lists/plugin.min.js"></script>
|
| <script src="/tinymce/js/tinymce/plugins/code/plugin.min.js"></script>
|
| <script src="/tinymce/js/tinymce/plugins/fullpage/plugin.min.js"></script>
|
| <script src="/tinymce/js/tinymce/plugins/charmap/plugin.min.js"></script>
|
|
|
|
|
|
|
| </body>
|
| </html>
|
|
|
| <div id="load"></div>
|
| <div id="contents" style="visibility:hidden;opacity:0;">
|
| <script type="text/javascript">
|
|
|
| function setCurrentMenuActive() {
|
| $(".header__nav-wrapper .nav__menu li a").each(function () {
|
| var link = $(this);
|
| var urlLink = link.get(0).href;
|
| if (urlLink === location.href) {
|
|
|
| var urlLinks = link.parent().parent().parent().parent().children();
|
| var idLink = link.parent().parent().parent().parent().children().attr('id');
|
| if (idLink == "primary-dropdown-control-2") {
|
| urlLinks.addClass("active");
|
| }
|
| else if (idLink == "primary-dropdown-control-1") {
|
| urlLinks.addClass("active");
|
| }
|
| else if (idLink == "aAllAssignedTasksData") {
|
| urlLinks.addClass("active");
|
| }
|
| else {
|
| link.addClass("active");
|
| }
|
| return false;
|
| }
|
| });
|
|
|
| $('.btnGroupsISLG').each(function () {
|
|
|
| var link = $(this);
|
| var urlLink = link.get(0).pathname;
|
| if (urlLink === "/Admin/Group/Index" || urlLink === "/Admin/Subscriber/Index") {
|
| $('#aGroupSubcUser').addClass("active");
|
| }
|
|
|
| });
|
|
|
| $(".clsSideBarDataLink").each(function () {
|
| var link = $(this);
|
| var urlLink = link.get(0).href;
|
| if (urlLink === location.href) {
|
| $('#primary-dropdown-control-1').addClass('active');
|
| }
|
| }).click(function () {
|
| $('.clsHeaderMenus').removeClass('active');
|
| var link = $(this);
|
| var urlLink = link.get(0).href;
|
| if (urlLink == "javascript:void(0)") {
|
| $('#primary-dropdown-control-1').addClass('active');
|
| }
|
| });
|
| }
|
|
|
| $(document).ready(function () {
|
| $(".daterange").daterangepicker({
|
| locale: {
|
| format: "MMMM D, YYYY"
|
| },
|
| "showDropdowns": true,
|
| startDate: moment(),
|
| endDate: moment().add(1, 'years')
|
| });
|
|
|
| callNotifications();
|
| setCurrentMenuActive();
|
|
|
| //Start By Anil Mori on 24/02/2020 for redirec to relavent my assigned task table while user come through email link. (From Assigne task mail)
|
| if ('' != '') {
|
| var tasklistid = '';
|
| ' = null'
|
| ' = null'
|
| ' = null'
|
| ' = null'
|
| var element = $('.documentStateHyperLink');
|
| for (var i = 0; i < element.length; i++) {
|
| if ($(element[i]).attr('data-tasklistid') == tasklistid) {
|
| $(element[i]).click();
|
| break;
|
| }
|
| }
|
| }
|
| //Start By Anil Mori on 03/09/2019 for redirec to relavent document while user come through email link.(From document state change mail)
|
| else if ('' != '' && '' != '') {
|
|
|
| var path = '';
|
| var id = '';
|
|
|
| ' = null'
|
| ' = null'
|
| ' = null'
|
| ' = null'
|
|
|
| $.ajax({
|
| url: path,
|
| data: { "contentTypeDataMasterId": id },
|
| type: "GET",
|
| beforeSend: function () {
|
| ProgressBar.show($("body"));
|
| },
|
| failure: function (data) { ProgressBar.hide($("body")); },
|
| success: function (data) {
|
| $("#page-content").html(data);
|
| $('html, body').scrollTop(0);
|
|
|
| if (!path.includes("CreateDispute")) {
|
| //setTimeout(function () {
|
| // $("#tab-2").click();
|
| //}, 1);
|
| }
|
|
|
| ProgressBar.hide($("body"));
|
| },
|
| error: function (passParams) {
|
| ProgressBar.hide($("body"));
|
| }
|
| });
|
| }
|
| //End By Anil Mori on 03/09/2019
|
| });
|
|
|
| document.onreadystatechange = function () {
|
| var state = document.readyState
|
| if (state == 'interactive') {
|
| } else if (state == 'complete') {
|
| document.getElementById('interactive');
|
| document.getElementById('load').style.visibility = "hidden";
|
| $('.table__container').css('visibility', 'visible').animate({ opacity: 1.0 }, 550);
|
| }
|
| }
|
|
|
| function off() {
|
| document.getElementById("overlay").style.display = "none";
|
| }
|
|
|
| function callNotifications() {
|
| $.ajax({
|
| url: "/Admin/Dashboard/GetTaskAssignmentNotificationData",
|
| type: "GET",
|
| dataType: "json",
|
| data: {},
|
| success: function (data) {
|
| $('.notificationClassIndicator').text(data.length);
|
| if (data !== null && data.length > 0) {
|
| for (var i = 0; i < data.length; i++) {
|
| //$('.dvNotificationsDatas-1').append('<li id="liMasterID-' + data[i].TaskMasterId + '"><strong>You have been assigned</strong>:'+
|
| // '<span data-id="' + data[i].TaskMasterId + '" class= "closeNotifications" >×</span>' +
|
| // '<br><strong>' + data[i].TaskName + '</strong> ' + data[i].TaskFor + '<br>' +
|
| // '<a style="cursor:pointer" data-mastername=' + data[i].MasterName.replace(' ','$_$') + ' data-contenttypemasterid=' + data[i].ContentTypeDataMasterId + ' class="spanNotification documentTaskClick">' + data[i].Filename + '</a>' +
|
| // '</li><div class="liNotificationAssingnee" id="dvliNotificationAssingnee-' + data[i].TaskMasterId + '"></div>');
|
|
|
| $('.dvNotificationsDatas-1').append('<li style="border-bottom:none;"><strong>' + data[i].TitleText + '</strong>:' +
|
| '<a class="spanNotification documentTaskClick" style="cursor:pointer;font-weight:100!important;padding:0px!important" data-mastername=' + data[i].MasterName.replace(' ', '$_$') + ' data-contenttypemasterid=' + data[i].ContentTypeDataMasterId +'>' + data[i].Filename +
|
| ' ' + data[i].TaskFor + ' ' + data[i].TaskName + '</a>' +'<br>' +
|
| '<button class="button button--icon button--icon-simple clear-notification closeNotifications" style="cursor:pointer;" data-documentid="' + data[i].DocumentId + '" data-id="' + data[i].TaskMasterId + '">' +
|
| '<i class="fal fa-times" aria-hidden="true"></i><span class="webaim-hidden">Clear Notification</span></button > ' +
|
| '<div class="liNotificationAssingnee"></div>'+
|
| '</li>');
|
| }
|
| }
|
| if (data.length > 0) {
|
| $('.dvNotificationsDatas-1').append('<a class="dvNotificationClearAll back-link1 cursor--pointer"><strong>Clear all</strong></a>');
|
| } else {
|
| $('.dvNotificationsDatas-1').remove();
|
| }
|
| }
|
| });
|
| }
|
|
|
| $(document).delegate(".closeNotifications", "click", function () {
|
| var taskMasterIds = '', documentIds = '';
|
| if ($(this).attr("data-id") > 0) {
|
| taskMasterIds = $(this).attr("data-id");
|
| } else {
|
| documentIds = $(this).attr("data-documentid");
|
| }
|
|
|
| var thisData = $(this);
|
|
|
| $.ajax({
|
| url: "/Admin/Dashboard/DeleteAssigneeNotificationsByIds",
|
| type: "POST",
|
| dataType: "json",
|
| data: { "taskMasterIds": taskMasterIds, "documentIds": documentIds },
|
| success: function (data) {
|
| if (data.key === "Success") {
|
| var closebtns = document.getElementsByClassName("closeNotifications");
|
| var deletedCount = closebtns.length;
|
| deletedCount = deletedCount - 1;
|
| $('.notificationClassIndicator').text(deletedCount);
|
| //$('#liMasterID-' + id).remove();
|
| $(thisData.parent()).remove();
|
| //$('#dvliNotificationAssingnee-' + id).remove();
|
| if (deletedCount === 0) {
|
| $('#dvNotificationsData-1').remove();
|
| }
|
| } else {
|
| $.notify({ message: 'Error has occured while delete notification.' }, { type: 'warning', placement: { from: "top", align: "center" } });
|
| }
|
| }
|
| });
|
| });
|
|
|
| $(document).on("click", ".dvNotificationClearAll", function () {
|
| var closebtns = document.getElementsByClassName("closeNotifications");
|
| var i;
|
| var taskmasterids = [], documentIds = [];
|
|
|
| if (closebtns.length > 0) {
|
| for (i = 0; i < closebtns.length; i++) {
|
| if ($(closebtns[i]).attr('data-id') > 0) {
|
| taskmasterids.push($(closebtns[i]).attr('data-id'));
|
| } else {
|
| documentIds.push($(closebtns[i]).attr('data-documentid'));
|
| }
|
| }
|
|
|
| if (taskmasterids.length > 0) {
|
| taskmasterids = taskmasterids.join();
|
| }
|
| if (documentIds.length > 0) {
|
| documentIds = documentIds.join();
|
| }
|
|
|
| $.ajax({
|
| url: "/Admin/Dashboard/DeleteAssigneeNotificationsByIds",
|
| type: "POST",
|
| dataType: "json",
|
| data: { "taskMasterIds": taskmasterids, "documentIds": documentIds },
|
| success: function (data) {
|
| if (data.key === "Success") {
|
| $('.notificationClassIndicator').text(0);
|
| $('.dvNotificationsDatas-1').remove();
|
| $('#dvNotificationsData-1').remove();
|
| } else {
|
| $.notify({ message: 'Error occured while delete notifications.' }, { type: 'warning', placement: { from: "top", align: "center" } });
|
| }
|
| }
|
| });
|
| }
|
| });
|
|
|
| // Code added by Janak Thakkar
|
| $(document).delegate(".documentTaskClick", "click", function () {
|
| var contentTypeDataMasterId = $(this).attr("data-contenttypemasterid");
|
| var MasterName = $(this).attr("data-mastername").replace('$_$',' ');
|
| var _url = "";
|
| var _data = "";
|
| var flagURL = false;
|
| var isView = false;
|
|
|
| if (contentTypeDataMasterId !== undefined && contentTypeDataMasterId > 0) {
|
| _data = "contentTypeDataMasterId=" + contentTypeDataMasterId;
|
| }
|
|
|
| if (MasterName.toLowerCase().trim() === 'dispute documents')
|
| {
|
| _url = "/Admin/ContentTypeData/EditDisputeDocument";
|
| flagURL = true;
|
| isView = true;
|
| _data = { "contentTypeDataMasterId": contentTypeDataMasterId, "isView": isView, defaultView: false};
|
| }
|
| else if (MasterName.toLowerCase().trim() === 'treaties')
|
| {
|
| _url = "/Admin/ContentTypeData/CreateTreaties";
|
| }
|
| else if (MasterName.toLowerCase().trim() === 'arbitration rules')
|
| {
|
| _url = "/Admin/ContentTypeData/CreateArbitrationRule";
|
| }
|
| else if (MasterName.toLowerCase().trim() === 'disputes')
|
| {
|
| if ($(this).parent().find('button.closeNotifications').length > 0) {
|
| $(this).parent().find('button.closeNotifications').click();
|
| }
|
|
|
| _url = "/Admin/ContentTypeData/CreateDispute";
|
| }
|
|
|
| $.ajax({
|
| url: _url,
|
| data: _data,
|
| type: "GET",
|
| beforeSend: function () {
|
| ProgressBar.show($("body"));
|
| },
|
| failure: function (data) { ProgressBar.hide($("body")); },
|
| success: function (data) {
|
| callNotifications();
|
| if (flagURL) {
|
| window.location = data.url;
|
| } else {
|
| $("#page-content").html(data);
|
| }
|
| $('html, body').scrollTop(0);
|
|
|
| $('#dvNotificationsData-1').hide();
|
|
|
| //setTimeout(function () {
|
| // $('.nav__submenu').hide();
|
| // if (isView) {
|
| // //setTimeout(function () {
|
| // // $("#tab-2").click();
|
| // //}, 1);
|
| // } else {
|
| // if ($('.sticky').length > 0) {
|
| // //setDocumentTextTabActive();
|
| // }
|
| // }
|
| // isView = false;
|
| //}, 1000);
|
|
|
| ProgressBar.hide($("body"));
|
| },
|
| error: function (passParams) {
|
| ProgressBar.hide($("body"));
|
| }
|
| });
|
| });
|
|
|
| function setDocumentTextTabActive() {
|
|
|
| $('#tab-2').click();
|
| }
|
| </script>
|
| </div>
|
|
|
| <script type="text/javascript">
|
| window.onload = function () {
|
| setTimeout(function () {
|
| $('.dropdown__delete-message').hide();
|
| }, 500);
|
|
|
| if (0 > 0)
|
| {
|
| }
|
| };
|
|
|
| function dateValidation(dateValue) {
|
| if (moment(dateValue, 'DD/MM/YYYY', true).isValid()) {
|
| return true;
|
| } else {
|
| return false;
|
| }
|
| }
|
|
|
| function isFutureDate(idate) {
|
| var today = new Date().getTime(),
|
| idate = idate.split("/");
|
|
|
| idate = new Date(idate[2], idate[1] - 1, idate[0]).getTime();
|
| return (today - idate) < 0;
|
| }
|
|
|
| function setDropDownArrow() {
|
| //this code for set dropdown icon in paitial view only.
|
| $("select.form__input").each(function () {
|
| if (!$(this).parent().hasClass('form__select-wrapper')) {
|
| $(this).wrap('<div class="form__select-wrapper"></div>')
|
| $(this).parent().append('<i class="fal fa-angle-down" aria-hidden="true"></i>')
|
| }
|
| });
|
| // $(".form__select-wrapper").append('<i class="fal fa-angle-down" aria-hidden="true"></i>')
|
| //End
|
| }
|
|
|
| function stringToParseDMY(value) {
|
| var date = value.split("/");
|
| var d = parseInt(date[0], 10),
|
| m = parseInt(date[1], 10),
|
| y = parseInt(date[2], 10);
|
| return new Date(y, m - 1, d);
|
| }
|
|
|
| // Start Get cookie and set cookie by : Janak Thakkar 21-11-2019
|
| // for redirection for metafield and fieldset detail page
|
| function setCookie(cname, cvalue) {
|
| document.cookie = cname + "=" + cvalue + ";"
|
| }
|
|
|
| function getCookie(cname) {
|
| var name = cname + "=";
|
| var decodedCookie = decodeURIComponent(document.cookie);
|
| var ca = decodedCookie.split(';');
|
| for (var i = 0; i < ca.length; i++) {
|
| var c = ca[i];
|
| while (c.charAt(0) == ' ') {
|
| c = c.substring(1);
|
| }
|
| if (c.indexOf(name) == 0) {
|
| return c.substring(name.length, c.length);
|
| }
|
| }
|
| return "";
|
| }
|
|
|
| function deleteCookie(name) {
|
| document.cookie = name + '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
|
| }
|
| // End Get cookie and set cookie : Janak Thakkar 21-11-2019
|
|
|
| //this ajaxError handling Global Event added by Anil Mori on 28-03-2020
|
| $(document).bind("ajaxError", function (XMLHttpRequest, textStatus, errorThrown) {
|
| if (textStatus.status == 401) {
|
| location.href = '/Admin/Home/Login';
|
| }
|
| });
|
|
|
| </script>
|
| |